Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotionto application level ... - Mailing list pgsql-general

From Rory Campbell-Lange
Subject Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotionto application level ...
Date
Msg-id 20170614185400.GD473@campbell-lange.net
Whole thread Raw
In response to [GENERAL] Repmgr + pgbouncer - Notification of master promotion to applicationlevel ...  (Martin Goodson <kaemaril@googlemail.com>)
Responses Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotionto application level ...
List pgsql-general
On 14/06/17, Martin Goodson (kaemaril@googlemail.com) wrote:
> The new master's repmgr promote script will execute commands to pause
> pgbouncer, reconfigure pgbouncer to point to the new database address, and
> then resume.

You could just move the service ip address at the new postgresql master
to which the pgbouncer instances on each app server could reconnect.

I assume, with reference to https://github.com/2ndQuadrant/repmgr, that
you could use repmgrd to trigger a script to do just that at
"switchover", possibly something you would need to monitor the
"repl_events" table to achieve.

Rory


pgsql-general by date:

Previous
From: Martin Goodson
Date:
Subject: [GENERAL] Repmgr + pgbouncer - Notification of master promotion to applicationlevel ...
Next
From: Martin Goodson
Date:
Subject: Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotionto application level ...