pgpool / pgpool2

This is the official mirror of git://git.postgresql.org/git/pgpool2.git. Note that this is just a *mirror* - we don't work with pull requests on github. Please subscribe to pgpool-hackers mailing list from our website and submit your patch to this mailing list.
https://www.pgpool.net
Other
305 stars 87 forks source link

reload doest read again pool_passwd [version 4.0.5] #31

Closed pserranoa closed 5 years ago

pserranoa commented 5 years ago

working with version: pgpool-II version 4.0.5 (torokiboshi)

If you add new users to the file pool_passwd to authenticate, and force reload of the config, those new users are not available.

Only if you restart :-( the daemon those new users will be available.

Any way to resolve this?

tatsuo-ishii commented 5 years ago

Works for me.

t-ishii$ cat pgpool_reload 
dir=`pwd`
PGPOOL_INSTALL_DIR=/usr/local
$PGPOOL_INSTALL_DIR/bin/pgpool -f $dir/etc/pgpool.conf reload
t-ishii$ createuser -p 11000 foo
t-ishii$ psql -p 11000 test
psql (12beta1, server 11.2)
Type "help" for help.

test=# alter user foo with encrypted password 'foo';
ALTER ROLE
t-ishii$ psql -p 11000 -U foo test
psql: error: could not connect to server: FATAL:  md5 authentication failed
DETAIL:  pool_passwd file does not contain an entry for "foo"
t-ishii$ pg_md5 -m -f etc/pgpool.conf -u foo foo
t-ishii$ cat etc/pool_passwd 
t-ishii:md5a16f9d87e344969ec59de417447348b3
foo:md5fdba98970961edb29f88241b9d99d890
t-ishii$ ./pgpool_reload 
t-ishii$ psql -p 11000 -U foo test
Password for user foo: 
psql (12beta1, server 11.2)
Type "help" for help.

test=> \q
pserranoa commented 5 years ago

could be the way we present the pool_passwd file. Is a file rendered by a consul-template... I will try directly. Sorry