[pgpool-general: 2724] Re: Using one pgpoll instance per app server?

Juergen Brendel juergen at brendel.com
Tue Apr 8 08:42:06 JST 2014


Thank you again for your reply.

On Tue, 2014-04-08 at 08:11 +0900, Tatsuo Ishii wrote:
> Yes, if master DB fails, all pgpool instances eventually recognize
> it. Problem is, all pgpool instances try to start failover script,
> which may or may not work depending on the coding of the script. For
> example, pgpool1 promotes Slave DB to Master, then pgpool2 tries to
> promote as well without success if the script did not expect promoting
> PostgreSQL is not standby.

Ah, ok, I see the problem.

> More serious problem is, it is possible that on a flaky network
> (switch) pgpool1 detects Master DB goes down because of connection
> problem between pgpool1 and Master DB (actually Master DB does not go
> down), and promotes Slave DB to master. On the other hand, connection
> between pgpool2 and Master DB is healthy and pgpool2 keeps on sending
> update requests to Master DB. As a result, both Master DB and Slave
> DB are now indecent master DB (we call it "split brain").
> This kind of problem can be solved by watchdog: all watchdog process on
> pgpool[123] communicates each other to solve the problem described
> above. In the connection problem scenario between pgpool1 and Master
> DB, pgpool1 initiates failover, then let pgpool2 and pgpool3 recognize
> Master DB goes down.

Do you know if there has been a tutorial or if there exists some
documentation, which describes the proper setup of watchdog for this
kind of scenario? Any hint or link would be much appreciated.

> > Now imagine that replication between master and slave DB is handled by
> > those pgpool instances as well. Would this still be possible?
> What do you mean by "handled"? You mean pgpool's native replication
> (without using streaming replication of PostgreSQL)?

Yes, that's what I meant. Using pgpool's native replication. Is that
possible in this sort of setup?


More information about the pgpool-general mailing list