Disable Streaming Replication ==> Stop WAL Sender on master and WAL receiver on Slave
Hi all,
I read in pg mail archives that postgresql-9.1 release added support or
pausing and resuming (or disabling and enabling) streaming replication but
could not find any relevant configuration settings for achieving the same.
the closest that i could find so far are:
replication_timeout (integer) that stops replication connections that are
inactive (perhaps due to standby failure)
replication_timeout_action(enum) was mentioned in some mail archives but
not present in the current documentation.
pg_xlog_replay_pause() and pg_xlog_replay_resume() which just pauses the
recovery (or application of WAL contents) on the Standby but still let the
streaming replication continue (accumulate the WAL files on the Standby
with out applying those)
Interestingly, even in the documentation for pg_xlog_replay_pause, it was
written that
"If streaming replication is disabled, the paused state may continue
indefinitely without problem. While streaming replication is in progress
WAL records will continue to be received, which will eventually fill
available disk space, depending upon the duration of the pause, the rate of
WAL generation and available disk space"
But how do I disable streaming replication, with the effect that both WAL
sender on master and WAL receiver on slave gets stopped? Similarly, when I
enable streaming replication, the WAL sender and WAL receiver processes
would need to be started.
Could some one please explain the GUC settings or the SQL function calls
that help achieving this?
Thanks and Regards,
Samba
On Tue, Nov 1, 2011 at 1:35 PM, Samba <saasira@gmail.com> wrote:
But how do I disable streaming replication, with the effect that both WAL
sender on master and WAL receiver on slave gets stopped? Similarly, when I
enable streaming replication, the WAL sender and WAL receiver processes
would need to be started.
There is no such thing that i know. but the effect is the same as if
you shutdown the standby.
The problem is that if you have a standby server and stop walsender
and walreceiver. what happens when you start them again:
1) there would be accumalated work (wal records to send and to
receive), so it will take some time until standby catch up
2) what if the wal segment that was being used when you stopped
walsender is reused in master before walsender is reactivated?
--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación