pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCascade Standby Configuration in 9.2.4
4+ messages / 2 participants
[nested] [flat]
* Cascade Standby Configuration in 9.2.4
@ 2014-04-01 22:17 Murthy Nunna <mnunna@fnal.gov>
2014-04-01 22:35 ` Re: Cascade Standby Configuration in 9.2.4 Scott Ribe <scott_ribe@elevated-dev.com>
0 siblings, 1 reply; 4+ messages in thread
From: Murthy Nunna @ 2014-04-01 22:17 UTC (permalink / raw)
To: pgsql-admin
Greetings!
I am setting up cascade standby (primary->slave1->slave2)
Everything is working as expected but I am not sure why it is working though....
Primary: archive = on and archive_command is enabled to send logs to slave1
I can see in pg_log that logs are being rsynced to slave1
Slave1: archive = on (I am not sure what this does in case of standby) archive_command is enabled to send logs to slave2
Problem: I don't see logs going to slave2 though
Slave2:archive and archive_command are commented out
I don't see anywhere logs being shipped from slave1 to slave2 but when I stop slave2 and do some activity on primary and later restart slave2 I see the data in slave2. This means somehow logs are getting to slave2 and eventually streaming is catching up....
Can you tell what I am missing here????
Thanks for reading this.
Murthy
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Cascade Standby Configuration in 9.2.4
2014-04-01 22:17 Cascade Standby Configuration in 9.2.4 Murthy Nunna <mnunna@fnal.gov>
@ 2014-04-01 22:35 ` Scott Ribe <scott_ribe@elevated-dev.com>
2014-04-01 23:20 ` Re: Cascade Standby Configuration in 9.2.4 Murthy Nunna <mnunna@fnal.gov>
0 siblings, 1 reply; 4+ messages in thread
From: Scott Ribe @ 2014-04-01 22:35 UTC (permalink / raw)
To: Murthy Nunna <mnunna@fnal.gov>; +Cc: pgsql-admin
Sounds like you're confused regarding the difference between WAL-shipping replication and streaming replication. In streaming replication, you don't have to ship WAL files. (You need to be sure that the WALs are preserved on master long enough for the slave to stream them, but you don't have to ship them.)
On Apr 1, 2014, at 4:17 PM, Murthy Nunna <mnunna@fnal.gov> wrote:
> Greetings!
>
> I am setting up cascade standby (primary->slave1->slave2)
>
> Everything is working as expected but I am not sure why it is working though….
>
> Primary: archive = on and archive_command is enabled to send logs to slave1
> I can see in pg_log that logs are being rsynced to slave1
>
> Slave1: archive = on (I am not sure what this does in case of standby) archive_command is enabled to send logs to slave2
> Problem: I don’t see logs going to slave2 though
>
> Slave2:archive and archive_command are commented out
>
> I don’t see anywhere logs being shipped from slave1 to slave2 but when I stop slave2 and do some activity on primary and later restart slave2 I see the data in slave2. This means somehow logs are getting to slave2 and eventually streaming is catching up….
>
> Can you tell what I am missing here????
>
> Thanks for reading this.
> Murthy
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Cascade Standby Configuration in 9.2.4
2014-04-01 22:17 Cascade Standby Configuration in 9.2.4 Murthy Nunna <mnunna@fnal.gov>
2014-04-01 22:35 ` Re: Cascade Standby Configuration in 9.2.4 Scott Ribe <scott_ribe@elevated-dev.com>
@ 2014-04-01 23:20 ` Murthy Nunna <mnunna@fnal.gov>
2014-04-01 23:48 ` Re: Cascade Standby Configuration in 9.2.4 Scott Ribe <scott_ribe@elevated-dev.com>
0 siblings, 1 reply; 4+ messages in thread
From: Murthy Nunna @ 2014-04-01 23:20 UTC (permalink / raw)
To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-admin
Thanks for the clarification Scott... What is the restore_command in recovery.conf does in case of streaming replication if it doesn't need logs available locally on the slave machine. Do you think if the streaming falls behind, then slave will request master to ship logs??????
Recovery.conf from slave:
# Required for archive recovery if streaming replication falls behind too far.
restore_command = 'cp /data/postgres/archive/rep_poc/remote/%f %p'
-----Original Message-----
From: Scott Ribe [mailto:scott_ribe@elevated-dev.com]
Sent: Tuesday, April 01, 2014 5:35 PM
To: Murthy Nunna
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Cascade Standby Configuration in 9.2.4
Sounds like you're confused regarding the difference between WAL-shipping replication and streaming replication. In streaming replication, you don't have to ship WAL files. (You need to be sure that the WALs are preserved on master long enough for the slave to stream them, but you don't have to ship them.)
On Apr 1, 2014, at 4:17 PM, Murthy Nunna <mnunna@fnal.gov> wrote:
> Greetings!
>
> I am setting up cascade standby (primary->slave1->slave2)
>
> Everything is working as expected but I am not sure why it is working though....
>
> Primary: archive = on and archive_command is enabled to send logs to
> slave1 I can see in pg_log that logs are being rsynced to slave1
>
> Slave1: archive = on (I am not sure what this does in case of standby)
> archive_command is enabled to send logs to slave2
> Problem: I don't see logs going to slave2 though
>
> Slave2:archive and archive_command are commented out
>
> I don't see anywhere logs being shipped from slave1 to slave2 but when I stop slave2 and do some activity on primary and later restart slave2 I see the data in slave2. This means somehow logs are getting to slave2 and eventually streaming is catching up....
>
> Can you tell what I am missing here????
>
> Thanks for reading this.
> Murthy
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Cascade Standby Configuration in 9.2.4
2014-04-01 22:17 Cascade Standby Configuration in 9.2.4 Murthy Nunna <mnunna@fnal.gov>
2014-04-01 22:35 ` Re: Cascade Standby Configuration in 9.2.4 Scott Ribe <scott_ribe@elevated-dev.com>
2014-04-01 23:20 ` Re: Cascade Standby Configuration in 9.2.4 Murthy Nunna <mnunna@fnal.gov>
@ 2014-04-01 23:48 ` Scott Ribe <scott_ribe@elevated-dev.com>
0 siblings, 0 replies; 4+ messages in thread
From: Scott Ribe @ 2014-04-01 23:48 UTC (permalink / raw)
To: Murthy Nunna <mnunna@fnal.gov>; +Cc: pgsql-admin
On Apr 1, 2014, at 5:20 PM, Murthy Nunna <mnunna@fnal.gov> wrote:
> Thanks for the clarification Scott... What is the restore_command in recovery.conf does in case of streaming replication if it doesn't need logs available locally on the slave machine.
It copies the files. It has no way of knowing whether or not there's a WAL-shipping replica out there somewhere which needs them.
> Do you think if the streaming falls behind, then slave will request master to ship logs??????
The slave does not request the master to ship logs. The slave, when started uses the WAL files it finds in its locally-available WAL archive, then starts streaming from the master, which requires that there not be a gap between its local copies and what's still available on the master.
This is all covered in the documentation:
<http://www.postgresql.org/docs/9.2/static/high-availability.html;
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2014-04-01 23:48 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 22:17 Cascade Standby Configuration in 9.2.4 Murthy Nunna <mnunna@fnal.gov>
2014-04-01 22:35 ` Scott Ribe <scott_ribe@elevated-dev.com>
2014-04-01 23:20 ` Murthy Nunna <mnunna@fnal.gov>
2014-04-01 23:48 ` Scott Ribe <scott_ribe@elevated-dev.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox