Wal archiving and streaming replication

Started by alexondiover 14 years ago7 messagesgeneral
Jump to latest
#1alexondi
alexondi@rambler.ru

Hi!
Do I need setup wal archiving (archiving_mode = on) setup when I use
streaming replication?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Wal-archiving-and-streaming-replication-tp4726040p4726040.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#2Ray Stell
stellr@cns.vt.edu
In reply to: alexondi (#1)
Re: Wal archiving and streaming replication

On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote:

Hi!
Do I need setup wal archiving (archiving_mode = on) setup when I use
streaming replication?

yes
http://www.postgresql.org/docs/current/interactive/high-availability.html

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Ray Stell (#2)
Re: Wal archiving and streaming replication

On Tuesday, August 23, 2011 4:14:15 am Ray Stell wrote:

On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote:

Hi!
Do I need setup wal archiving (archiving_mode = on) setup when I use
streaming replication?

yes
http://www.postgresql.org/docs/current/interactive/high-availability.html

Actually no. Streaming will work without archiving. For a quick introduction
see:

http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#5_Minutes_to_Simple_Replication
--
Adrian Klaver
adrian.klaver@gmail.com

#4Ray Stell
stellr@cns.vt.edu
In reply to: Adrian Klaver (#3)
Re: Wal archiving and streaming replication

On Tue, Aug 23, 2011 at 06:23:58AM -0700, Adrian Klaver wrote:

On Tuesday, August 23, 2011 4:14:15 am Ray Stell wrote:

On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote:

Hi!
Do I need setup wal archiving (archiving_mode = on) setup when I use
streaming replication?

yes
http://www.postgresql.org/docs/current/interactive/high-availability.html

Actually no. Streaming will work without archiving. For a quick introduction
see:

http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#5_Minutes_to_Simple_Replication

right, you don't need to. I find it to be a best practice, which is different.

#5Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: Ray Stell (#4)
Re: Wal archiving and streaming replication

On Tue, Aug 23, 2011 at 7:17 PM, Ray Stell <stellr@cns.vt.edu> wrote:

On Tue, Aug 23, 2011 at 06:23:58AM -0700, Adrian Klaver wrote:

On Tuesday, August 23, 2011 4:14:15 am Ray Stell wrote:

On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote:

Hi!
Do I need setup wal archiving (archiving_mode = on) setup when I use
streaming replication?

yes

http://www.postgresql.org/docs/current/interactive/high-availability.html

Actually no. Streaming will work without archiving. For a quick

introduction

see:

http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#5_Minutes_to_Simple_Replication

right, you don't need to. I find it to be a best practice, which is
different.

Question:

Is it a best practice to keep cluster in Archive_mode = on and setup
streaming replication or just leave archive_mode=off?

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

#6Ray Stell
stellr@cns.vt.edu
In reply to: Raghavendra (#5)
Re: Wal archiving and streaming replication

On Tue, Aug 23, 2011 at 08:30:55PM +0530, Raghavendra wrote:

Is it a best practice to keep cluster in Archive_mode = on and setup
streaming replication or just leave archive_mode=off?

Depends. The reason for creating WAL is in case they are needed for recovery.
In the event that the stby host goes down, if bringing it back into service
exceeds wal_keep_segments on the primary then you would need to rebuild
the standby. This is a local decision and should be made based on business
rules.

#7Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: Ray Stell (#6)
Re: Wal archiving and streaming replication

On Tue, Aug 23, 2011 at 10:49 PM, Ray Stell <stellr@cns.vt.edu> wrote:

On Tue, Aug 23, 2011 at 08:30:55PM +0530, Raghavendra wrote:

Is it a best practice to keep cluster in Archive_mode = on and setup
streaming replication or just leave archive_mode=off?

Depends. The reason for creating WAL is in case they are needed for
recovery.
In the event that the stby host goes down, if bringing it back into service
exceeds wal_keep_segments on the primary then you would need to rebuild
the standby. This is a local decision and should be made based on business
rules.

Thanks Ray.

--Raghav