From: | Jerry Sievers <gsievers19(at)comcast(dot)net> |
---|---|
To: | Joseph Kregloh <jkregloh(at)sproutloud(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Restart replicated slave procedure |
Date: | 2014-08-22 18:21:45 |
Message-ID: | 86egw8fkqu.fsf@jerry.enova.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Joseph Kregloh <jkregloh(at)sproutloud(dot)com> writes:
> Hi,
>
> Currently I am doing asynchronous replication from master to
> slave. Now if I restart the slave it will fall out of sync with the
> master. Is there a correct procedure or set of steps to avoid this? I
> am looking for best practices or suggestions. Whenever my slave fell
> out of sync I would either issue a new pg_base_backup() or set the
> master to pg_start_backup() do an rsync and stop using
> pg_stop_backup(). If there is a way to avoid any of that, for example
> pause replication to hold all the wal files until the replicated slave
> comes back and then release them once the replicated slave is up.
>
> I apologize if this question has already been asked. I did some searching beforehand.
See the manual and read up on the 2 GUCs; archive_command and wal_keep_segments.
wal_keep_segments lets you hold a configurable number of WAL segments
back and buy some more time till you have to resync the stand bys.
Setting archive_command to '' or something like '/bin/false' lets you
delay archiving forever till you change them back again and/or fill
whatever file system pg_xlog writes to :-)
>
> Thanks,
> -Joseph Kregloh
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-08-22 18:33:20 | Re: deadlock in single-row select-for-update + update scenario? How could it happen? |
Previous Message | hubert depesz lubaczewski | 2014-08-22 18:14:58 | Re: deadlock in single-row select-for-update + update scenario? How could it happen? |