repmgr and archive_mode

Started by Toby Corkindaleover 14 years ago6 messagesgeneral
Jump to latest
#1Toby Corkindale
toby.corkindale@strategicdata.com.au

Hi,
In the repmgr README, it suggests configuration should include:

archive_mode = on
archive_command = 'cd .'

Could someone explain why we need archive_mode enabled? In my own
testing of Pg's streaming replication, I've found it to work without
this enabled.

Cheers,
Toby

#2Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: Toby Corkindale (#1)
Re: repmgr and archive_mode

On Fri, Jul 29, 2011 at 1:42 PM, Toby Corkindale <
toby.corkindale@strategicdata.com.au> wrote:

Hi,
In the repmgr README, it suggests configuration should include:

archive_mode = on
archive_command = 'cd .'

Could someone explain why we need archive_mode enabled? In my own testing
of Pg's streaming replication, I've found it to work without this enabled.

AFAIK, enabling 'archive_mode' parameter turns the cluster into Archive-log
Mode and generates a copy of WAL segements to ARCHIVE destination.

Strange to know that Streaming replication done without this parameter,
could you share the output of the below command in the PRIMARY cluster.

show archive_mode
show archive_command

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

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Raghavendra (#2)
Re: repmgr and archive_mode

On Friday, July 29, 2011 1:23:55 am Raghavendra wrote:

On Fri, Jul 29, 2011 at 1:42 PM, Toby Corkindale <

toby.corkindale@strategicdata.com.au> wrote:

Hi,
In the repmgr README, it suggests configuration should include:

archive_mode = on
archive_command = 'cd .'

Could someone explain why we need archive_mode enabled? In my own testing
of Pg's streaming replication, I've found it to work without this
enabled.

AFAIK, enabling 'archive_mode' parameter turns the cluster into Archive-log
Mode and generates a copy of WAL segements to ARCHIVE destination.

Strange to know that Streaming replication done without this parameter,
could you share the output of the below command in the PRIMARY cluster.

Not really, it just means that the WAL segments are not stored once they leave
the the primary. Think of it as a |.

show archive_mode
show archive_command

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

--
Adrian Klaver
adrian.klaver@gmail.com

#4Jaime Casanova
jcasanov@systemguards.com.ec
In reply to: Toby Corkindale (#1)
Re: repmgr and archive_mode

On Fri, Jul 29, 2011 at 3:12 AM, Toby Corkindale
<toby.corkindale@strategicdata.com.au> wrote:

Hi,
In the repmgr README, it suggests configuration should include:

archive_mode = on
archive_command = 'cd .'

Could someone explain why we need archive_mode enabled? In my own testing of
Pg's streaming replication, I've found it to work without this enabled.

it's not really needed but in some situations you could want to
archive wal segments (for example if you want to shut down the standby
without having to put a really big value in wal_keep_segments) and
while archive_command can be changed at anytime just reloading
archive_mode needs to restart the server. so this is just a good
configuration for 24x7 setups

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

#5Toby Corkindale
toby.corkindale@strategicdata.com.au
In reply to: Jaime Casanova (#4)
Re: repmgr and archive_mode

----- Original Message -----

<toby.corkindale@strategicdata.com.au> wrote:

Hi,
In the repmgr README, it suggests configuration should include:

archive_mode = on
archive_command = 'cd .'

Could someone explain why we need archive_mode enabled? In my own
testing of
Pg's streaming replication, I've found it to work without this
enabled.

it's not really needed but in some situations you could want to
archive wal segments (for example if you want to shut down the standby
without having to put a really big value in wal_keep_segments) and
while archive_command can be changed at anytime just reloading
archive_mode needs to restart the server. so this is just a good
configuration for 24x7 setups

Aaah.. now that explains it perfectly.

Many thanks for clearing that up! I hadn't realised that you could only change one of the two options on the fly.

Thanks,
Toby

#6Simon Riggs
simon@2ndQuadrant.com
In reply to: Toby Corkindale (#5)
Re: repmgr and archive_mode

On Sat, Jul 30, 2011 at 7:57 AM, Toby Corkindale
<toby.corkindale@strategicdata.com.au> wrote:

Many thanks for clearing that up! I hadn't realised that you could only change one of the two options on the fly.

The streaming rep options require a restart also...

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services