[pgpool-general: 3037] Re: pgpool-general Digest, Vol 33, Issue 3

Tatsuo Ishii ishii at postgresql.org
Thu Jul 17 15:08:38 JST 2014

> On Tue, Jul 15, 2014 at 9:22 AM, Muhammad Usama <m.usama at gmail.com> wrote:
>> On Wed, Jul 2, 2014 at 10:45 PM, Long On <on.long.on at gmail.com> wrote:
>>> Hello,
>>> I am also observing node 0 being promoted to master when using
>>> pcp_attach_node, after a recovery of node 0. Node 1 is master and should
>>> remain so but I see a failback sequence happening in pgpool.log. After
>>> which write statements are no longer possible since pgpool is sending them
>>> to node 0, which is now standby.
>> Whenever a new node is attached to pgpool-II using the pcp_attach_node utility.
>> pgpool-II forgets the previous primary node and start searching for
>> primary node again. The first node which fulfils the conditions for being
>> the primary node is selected as primary.
> Muhammad, what are the conditions pgpool looks for to decide if a node is
> primary or standby?

Basically pgpool-II calls pg_is_in_recovery() to know if it's standby
or not. If the functin returns true, it's standby. Otherwise primary.

Best regards,
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php

More information about the pgpool-general mailing list