Thread: Hot standby & SR - log shipping required?
Hello all, I'm tackling host standby & streaming replication for the first time, in a small set-up with just two computers (one master, one standby) and an extremely light load (at its busiest, one transaction every couple of minutes). Both systems are running PG 9.1 on Debian Wheezy from apt.postgresql.org. I've been reading the documentation and the articles on the wiki, and I'm confused on one point - the official docs [1] and one of the wiki articles [2] seem to indicate that you need to set up log-shipping as well as SR, whereas one of the wiki articles [2] indicates that log-shipping isn't required. I've followed [3] and it seems to work fine in initial trials; but I'm wondering if I'm missing something, or if I misunderstood [1] + [2] in the first place. Clarification would be appreciated! Many thanks, Ray. [1] http://www.postgresql.org/docs/9.1/static/warm-standby.html#STREAMING-REPLICATION [2] https://wiki.postgresql.org/wiki/Streaming_Replication [3] https://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#Binary_Replication_in_6_Steps -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
On Sep 13, 2013, at 3:51 PM, Raymond O'Donnell wrote: > [1] and one of the wiki > articles [2] seem to indicate that you need to set up log-shipping as > well as SR, whereas one of the wiki articles [2] indicates that > log-shipping isn't required. I've followed [3] and it seems to work fine > in initial trials; but I'm wondering if I'm missing something, or if I > misunderstood [1] + [2] in the first place. > Streaming replication works fine without log shipping. The logs are a good idea in case a pitr becomes required. I don't know why one would ever not write the archives, but I have done so. I think it was some silly, temporary disk space issue I had to work around.
T
he log shipping is useful when SR slave can not catch up the master and hungry enough to cause replication stop work.For example,when you want to stop the slave for a long time or do a large copy from,the wal_keep_segments on master reached,SR slave may not catch up the master.If log shipping is on,the slave will replay the WAL from archives,when catch up,RS will start again.
Jov
blog: http:amutu.com/blog
2013/9/14 Ray Stell <stellr@vt.edu>
Streaming replication works fine without log shipping. The logs are a good idea
On Sep 13, 2013, at 3:51 PM, Raymond O'Donnell wrote:
> [1] and one of the wiki
> articles [2] seem to indicate that you need to set up log-shipping as
> well as SR, whereas one of the wiki articles [2] indicates that
> log-shipping isn't required. I've followed [3] and it seems to work fine
> in initial trials; but I'm wondering if I'm missing something, or if I
> misunderstood [1] + [2] in the first place.
>
in case a pitr becomes required. I don't know why one would ever not write the
archives, but I have done so. I think it was some silly, temporary disk space issue
I had to work around.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 14/09/2013 04:31, Jov wrote: > T > he log shipping is useful when SR slave can not catch up the master and > hungry enough to cause replication stop work.For example,when you want > to stop the slave for a long time or do a large copy from,the > wal_keep_segments on master reached,SR slave may not catch up the > master.If log shipping is on,the slave will replay the WAL from > archives,when catch up,RS will start again. > > > Jov > blog: http:amutu.com/blog <http://amutu.com/blog> > > > 2013/9/14 Ray Stell <stellr@vt.edu <mailto:stellr@vt.edu>> > > > On Sep 13, 2013, at 3:51 PM, Raymond O'Donnell wrote: > > [1] and one of the wiki > > articles [2] seem to indicate that you need to set up log-shipping as > > well as SR, whereas one of the wiki articles [2] indicates that > > log-shipping isn't required. I've followed [3] and it seems to > work fine > > in initial trials; but I'm wondering if I'm missing something, or if I > > misunderstood [1] + [2] in the first place. > > > > Streaming replication works fine without log shipping. The logs are > a good idea > in case a pitr becomes required. I don't know why one would ever > not write the > archives, but I have done so. I think it was some silly, temporary > disk space issue > I had to work around. Thanks to you both for your responses - that clears it up for me. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie