[pgpool-general: 5606] Re: About pgpool backend and failover-command

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jul 4 17:44:20 JST 2017


> Thank you Tatsuo.
> 
> 
> 
> For question1, on pgpool FIRST startup, will it check automatically from all of the backends to find out who is the master pg server?

Yes.

> And only when failover it will then use the youngest node id as master?

Yes.

Actually there's no difference in the logic between start up and
failover regarding finding master (primary). Pgpool-II decides the
youngest node as the master which is *not* standby (i.e. return false
against pg_is_in_recovery()).

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

> From: Tatsuo Ishii<mailto:ishii at sraoss.co.jp>
> Sent: Tuesday, July 4, 2017 3:56 PM
> To: hiscal at outlook.com<mailto:hiscal at outlook.com>
> Cc: pgpool-general at pgpool.net<mailto:pgpool-general at pgpool.net>
> Subject: Re: [pgpool-general: 5603] About pgpool backend and failover-command
> 
> 
> 
>> Hi, all
>>
>> Iʼm new to pgpool, I have two questions here, can anyone give some advises? Thanks a lot.
> 
> Welcome to Pgpool-II world:-)
> 
>>   1.  I have two PostgreSQL server running as master and slave with streaming replication mode, so is it a MUST that the master PostgreSQL server should be defined as backend0 and slave as backend1?
> 
> No. The master can be either backend0 or backend1.
> 
>>   2.  The failover command will touch a trigger file to the new master, but which account will pgpool to execute the command?
> 
> The same account as pgpool process starts.
> 
> 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