[pgpool-general: 3117] detection of primary server
kent.tong.mo at gmail.com
Fri Aug 29 16:55:20 JST 2014
pgpool uses pg_is_in_recovery() to detect if a backend is a standby or not.
However, a hot standby server will be in recovery mode only initially, then
it will enter the standby mode and pg_is_in_recovery() will return false
(see below for the actual output with PostgreSQL 9.2). It means that pgpool
will may mistake a hot standby as the primary? Thanks!
bash-4.1$ tail 9.2/data/pg_log/postgresql-Fri.log
LOG: entering standby mode
LOG: redo starts at 0/1A000020
LOG: consistent recovery state reached at 0/1A0000C8
LOG: trigger file found: /tmp/trigger
LOG: redo done at 0/1A0000C8
LOG: selected new timeline ID: 2
LOG: database system is ready to accept read only connections
LOG: archive recovery complete
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
bash-4.1$ psql postgres
Type "help" for help.
postgres=# select pg_is_in_recovery();
IT author and consultant, child education coach
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pgpool-general