Postgres修改logging_collector参数后reload报错的迷惑

来源:互联网 发布:珍嗖啦淘宝上是真的吗 编辑:程序博客网 时间:2024/06/12 21:37
highgo=# select version();
              version               
------------------------------------
 HighGo Database 3.0.2 Linux 64-bit
(1 row)


highgo=# select kernel_version();
                                                 kernel_version                                                 
----------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.4.10 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11), 64-bit
(1 row)



highgo=# show logging_collector ;
 logging_collector 
-------------------
 off
(1 row)

highgo=# alter system set logging_collector='on';
ALTER SYSTEM
highgo=# \q
[highgo@sourcedb data]$ pg_ctl reload
日志:  接收到 SIGHUP, 重载配置文件
日志:  在没有启动服务器的情况下,不能改变参数 "logging_collector" 
日志:  配置文件 "/hgdata/highgo/HighGoDB/data/postgresql.auto.conf" 有错; 使用了不受影响的内容变动
server signaled
[highgo@sourcedb data]$ cat postgresql.auto.conf 
# Do not edit this file manually!
# It will be overwritten by ALTER SYSTEM command.
password_encryption = 'on'
logging_collector = 'on'
[highgo@sourcedb ~]$ ps -ef |grep postgres
highgo    2838     1  0 14:17 pts/0    00:00:00 /hgdata/highgo/HighGoDB/bin/postgres
highgo    2840  2838  0 14:17 ?        00:00:00 postgres: checkpointer process      
highgo    2841  2838  0 14:17 ?        00:00:00 postgres: writer process            
highgo    2842  2838  0 14:17 ?        00:00:00 postgres: wal writer process        
highgo    2843  2838  0 14:17 ?        00:00:00 postgres: autovacuum launcher process   
highgo    2844  2838  0 14:17 ?        00:00:00 postgres: stats collector process   
highgo    2872  2838  0 14:20 ?        00:00:00 postgres: highgo highgo [local] idle
highgo    2878  2222  0 14:21 pts/1    00:00:00 grep postgres


需要重启数据库服务才能生效。


[highgo@sourcedb data]$ pg_ctl stop
日志:  接到到智能 (smart) 停止请求
日志:  正在关闭autovacuum启动进程
日志:  正在关闭
waiting for server to shut down....日志:  数据库系统已关闭
 done
server stopped
[highgo@sourcedb data]$ 
[highgo@sourcedb data]$ pg_ctl start
server starting
[highgo@sourcedb data]$ 日志:  日志输出重定向到日志收集进程
提示:  后续的日志输出将出现在目录 "pg_log"中.


[highgo@sourcedb data]$ psql
psql (3.0.2)
Type "help" for help.


highgo=# show logging_collector;
 logging_collector 
-------------------
 on
(1 row)



阅读全文
0 0
原创粉丝点击