[Pgpool-general] how to find node role and order of scripts being run

Tatsuo Ishii ishii at sraoss.co.jp
Wed Oct 5 00:42:16 UTC 2011


>> In Streaming replication mode, how do I find which node is currently which
>> role?  That is, I'd like to know which node is considered the primary and
>> which are replicas. 

You can use standard PostgreSQL function pg_is_in_recover() to get the
information. It's not necessarily identical to what pgpool-II thinks,
but since pgpool-II also uses the function to judge which is which,
you could assume that what pg_is_in_recover() returns is what
pgpool-II thinks in real world.

It would be nice if pcp command returns that info directly though.

>> Also, what is the failback command expected to accomplish?

In streaming replication mode you essentially don't need to set
failback command. Of course if you want to be noticed by email in case
of the event happens for example, you could set it arbitrary shell
script.

> Should have mentioned: I'm specifically asking about version 3.1.0.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-general mailing list