[pgpool-general: 9288] Re: setup pgpool+postgresql in docker on different host server
Bo Peng
pengbo at sraoss.co.jp
Mon Dec 9 18:17:25 JST 2024
Hi,
> Thanks for your reply.
> I made a robust test for such configuration:
> server 1: Watchdog Leader + DB Standby
> server 2: Watchdog Standby + DB Primary
> server 3: Watchdog Standby + DB Standby
> power off server1 and server2 at same time, and only keep server 3 power
> on.
> For such case, server 3 doesn't work well, server 3 Watchdog comes to
> Leader role but delegate IP doesn't come up , DB is still in standby
> mode... Is't normal behavior or wrong configuration parameter somewhere?
That is the correct behavior.
If you shut down server1 and server2 at the same time,
Pgpool-II loses quorum and will not bring up the VIP or perform a failover.
Quorum is used to prevent split-brain scenarios.
If you want to allow failover even when the cluster loses quorum,
you can use dynamic cluster membership:
https://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#CONFIG-WATCHDOG-CLUSTER-MEMBERSHIP
wd_remove_shutdown_nodes = on
wd_lost_node_removal_timeout = <Timeout>
wd_no_show_node_removal_timeout = <Timeout>
Note that using the dynamic cluster membership has an associated risk of causing a split-brain.
> Bo Peng <pengbo at sraoss.co.jp> 于2024年11月21日周四 20:18写道:
>
> > Hi,
> >
> > On Thu, 21 Nov 2024 11:13:29 +0800
> > Hu Yansheng <yansheng.hu at gmail.com> wrote:
> >
> > > Hi,
> > > I followed:
> > https://www.pgpool.net/docs/latest/en/html/example-cluster.html
> > > and have installed 1primary +2 standby Postgresql clusters on 3 different
> > > server successfully. I want to know is it possible to install such
> > > configuration in docker containers? Thanks in advance!
> >
> > I think it is possible.
> > Since Pgpool-II (Watchdog) needs to connect with other containers,
> > network configuration is necessary to enable communication between them.
> >
> > --
> > Bo Peng <pengbo at sraoss.co.jp>
> > SRA OSS K.K.
> > TEL: 03-5979-2701 FAX: 03-5979-2702
> > URL: https://www.sraoss.co.jp/
> >
>
>
> --
> Best Regards
> Hu Yansheng
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/
More information about the pgpool-general
mailing list