[pgpool-general: 3049] Re: failover issue

Richard Michael rmichael at edgeofthenet.org
Thu Jul 24 03:49:53 JST 2014


Use "pg_ctl restart", you may need "pg_ctl -D $YOUR_PGDATA_DIR
restart" ; depending how your system is configured (e.g., if the
cluster you're restarting is not in the default location).

Also, consult "man pg_ctl" and check if any other options apply to
your configuration (timeout, restart type, etc.).  Though, I suspect
the default invocation I mentioned will be sufficient.

Alternatively, write a tiny wrapper to use as the "failover_command",
and have that wrapper do something like: "sudo service postgresql-9.3
restart" (after adding an appropriate sudo rule).

Hope this helps,
Richard

On Wed, Jul 23, 2014 at 11:44 AM, John Scalia <jayknowsunix at gmail.com> wrote:
> By my understanding, when a change is made in the recovery.conf file, then
> it is necessary to restart postgresql. So, with 2 different standby servers
> and the failure of the primary, the first standby gets promoted to master
> and the second standby must have the primary_conninfo changed to point to
> the new master. From what I've found online, this change will not be read in
> with only a reload.
>
> But, as the failover_command is run with the postgres userid, you cannot, on
> Linux, use a "service postgresql-9.3 restart" as that requires root, but
> could I use pg_ctl to force a reload without becoming root? If so, what
> would the pg_ctl command look like?
> --
> Jay
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list