[pgpool-general: 3108] Re: Possible split-brain scenario

jayknowsunix at gmail.com jayknowsunix at gmail.com
Wed Aug 20 09:33:37 JST 2014


Arrigato, Ishii-San,

Sent from my iPad

On Aug 19, 2014, at 7:26 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:

>> I'm trying to figure out if pgpool can avoid a split-brain scenario. Say my
>> primary server loses internet connectivity including with both my standbys, but
>> those standbys are still happily communicating with each other and with the
>> network. In that event, I would expect the first standby to promote itself to
>> become the new master and the second standby would start following it. I've
>> actually seen this work here. But, what happens to the original primary in the
>> event that network connectivity is restored? Unless it is demoted to become a
>> standby to the new primary, which in fact may not succeed, then I have a
>> split-brain situation. Would pgpool degenerate the old primary on reconnection?
>> I'm trying to figure out which pgpool would now have control of the overall
>> system: the one on the old primary or the one on the new primary?
> 
> In this case old primary is treated as "down" state by pgpool and
> pgpool does not route any request to the down node. So as long as
> clients connect to pgpool to use PostgreSQL, there should be no
> problem (no split brain). Of course if a client connects to the old
> primary directly (not via pgpool), that will be a problem but it's
> user's fault.

If this is so, what would cause the primary to bring down the VIP which by now the newly promoted primary would have assumed? If it doesn't do so, then an IP conflict would be present on the network. And Is there a way to have pgpool run a command script which would attempt to turn the old primary into a new standby for the newly promoted primary? (Place or build a recovery.conf file, for instance.) If so, I would assume that pgpool could then put the old primary back into service. Although that might still fail depending on how long the old server was incommunicado.

> 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