[pgpool-general: 5371] Re: [pgpool] Streaming Replication - Identify Slave Node Status

Tatsuo Ishii ishii at sraoss.co.jp
Thu Mar 16 07:50:21 JST 2017


> Hi all,
> 
> I have a synchronous streaming replication environment which is implemented
> using inbuilt replication mechanism in postgresql. There is a requirement
> that I need to fail the data modification transactions on master node if
> the slave node is down. (ie: transactions should commit when only both
> servers are up and running)
> 
> Please let me know whether there is a way to identify slave node status and
> fail the transaction using pgpool ?

There's no direct way to do that for now.

However, if you always start an explicit transaction, and set load
balance weight for master to 0, Pgpool-II always starts a transaction
for not only primary, but for standby as well. So when user sends a
commit to Pgpool-II, it will send the commit to both primary and
standby. If the standby is not up and running (or Pgpool-II cannot
reach to the standby), the commit request on the primary will fail.

I have not tested it yet though.

Best regards,
--
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