[pgpool-hackers: 3483] Proposal: Refactor configuration parameters

Bo Peng pengbo at sraoss.co.jp
Tue Dec 24 13:37:30 JST 2019


To simply configuration, I would like to refactor some configuration parameters.


(1) log_line_prefix

The current default value:

   log_line_prefix = '%t: pid %p: '

I think "log_line_prefix = '%m [%p] '" looks better, 
and PostgreSQL also use '%m [%p] ' for default.

However, pgpool doesn't support "%m" option (time stamp with milliseconds).
I would like to make pgpool support "%m" option. 


(2) other_pgpool_portx

The current default value:

    other_pgpool_portx = 5432

But, pgpool default port:

    port = 9999

The default value of other_pgpool_port should be "9999",
because it confuses the users.


(3) logdir = '/var/log/pgpool'

Because logdir is the directory of pgpool status file, not the log file directory,
we should change the parameter name.


(4) backend_xxxx1

backend_hostname0 = 'localhost'                                   
backend_port0 = 5432                                 
backend_weight0 = 1                     
backend_data_directory0 = '/var/lib/pgsql/data'
backend_flag0 = 'ALLOW_TO_FAILOVER'

#backend_hostname1 = 'host2'
#backend_port1 = 5433
#backend_weight1 = 1
#backend_data_directory1 = '/data1'
#backend_flag1 = 'ALLOW_TO_FAILOVER'


Because by default backend node1 is assumed as a different server, 
"backend_port1", "backend_data_directory1" should be same like node0.


(5) Default value of "*_listen_addresses" 

listen_addresses = 'localhost'
pcp_listen_addresses = '*'

Because listen_addresses is using 'localhost',
pcp_listen_addresses should use the same default value.


(6) ssl_cert

ssl_cert = './server.cert'
->
ssl_cert = './server.crt'


(7) Currently when building RPM packages, we only change
the default value in pgpool.conf, such as *_socket_dir,
pgpool.conf.sample-* has not been patched.

The pgpool.conf.sample-* should also be patched, 
because normally users copy the sample config files.


(8) Allow to specify units in time parameters.

For example, we can specify time units in PostgreSQL, such as,

    checkpoint_timeout = 5min

Shall we make pgpool to allow to specify the time units?


(9) memcache_oiddir

memqcache_oiddir = '/var/log/pgpool/oiddir'

I think it is better to use "/var/run/", rather than "/var/log/".


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan


More information about the pgpool-hackers mailing list