[pgpool-general: 1279] Re: [repmgr] Re: repmgr integration with pgpool-II

Tim Verhoeven tim.verhoeven.be at gmail.com
Thu Jan 3 18:36:57 JST 2013

Hi Andreas,

a) in our tests we ran into some issues in certain failback
scenario's. But currently we have both Postgres and pgpool running on
the same set of servers and the issues are very likely due to
interactions between al the layers in this setup.

b) this is something we would change in the new setup. We would
separate the postgres/repmgr and pgpool layers onto different
machines. Then let repmgr manage purely the postgres replication
master/slave setup. And pgpool would manage it own VIP for the clients
and does not need to worry/interact with postgres itself. Pgpool is
smart enough to see which machine is the master or slave and will send
the requests to the correct place.


On Wed, Jan 2, 2013 at 5:28 PM, Andreas Hilboll <lists at hilboll.de> wrote:
> Hi Tim,
> thanks for your answer! I would appreciate if you could elaborate a bit on
> a) this is not a perfect setup
> b) how you would adapt the setup for repmgr 2.0 (which is available as
>    beta), because then repmgr would need to inform pgpool about the
>    failover, because pgpool needs to know for the loadbalancing. Or, one
>    could use IP-failover and have a VIP for master and one for slave,
>    and then repmgr would need to switch VIPs as well. Then pgpool
>    wouldn't need to know about the failover event.
> Cheers, Andreas.
> Am 02.01.2013 17:19, schrieb Tim Verhoeven:
>> Hi Andreas,
>> I've basically done what you describe here. I have a Postgres
>> streaming replication master-slave setup that is managed by repmgr. I
>> just followed their documentation. Then I've added pgpool on top of
>> the Postgres servers and used the different scripts, those that pgpool
>> calls in failover scenario's, to use the correct repmgr commands. It
>> is not a perfect setup, but that is mostly related to pgpool itself
>> and not really the interaction between pgpool and repmgr. So we are
>> planning to redo some of the setup, especially once the failover
>> features in repmgr 2.0 become available.
>> Regards,
>> Tim
>> On Tue, Jan 1, 2013 at 1:28 PM, Andreas Hilboll <lists at hilboll.de> wrote:
>>> Hi all,
>>> I'm about to set up a two-node streaming-replication PostgreSQL 9.2 cluster.
>>> Because of its load-balancing capabilities, I want to use pgpool-II,
>>> which, if I understand correctly, can also detect and trigger a failover
>>> event.
>>> I am wondering how to best integrate the two tools? My first approach
>>> would probably be to disable automatic failover in repmgr, and have
>>> pgpool-II run the necessary repmgr commands for `standby promote` in
>>> case the master blacks out. I would also set an appropriate
>>> failback_command in pgpool-II to run repmgr `standby clone`.
>>> Has anyone been down this road? Any hints as to what I need to consider?
>>> Any tutorials available?
>>> Your help is greatly appreciated!
>>> Cheers, Andreas.
>>> _______________________________________________
>>> pgpool-general mailing list
>>> pgpool-general at pgpool.net
>>> http://www.pgpool.net/mailman/listinfo/pgpool-general

Tim Verhoeven - tim.verhoeven.be at gmail.com - 0479 / 88 11 83

Hoping the problem  magically goes away  by ignoring it is the
"microsoft approach to programming" and should never be allowed.
(Linus Torvalds)

More information about the pgpool-general mailing list