Hi Jeremy,
Thanks for the info on 9.3 vs 9.5. While searching for Paul's suggestion I'd seen the same thing, but didn't "reply all" so my response didn't make it into the mailing list.
Regarding your question, as I understand the process, you need to get the WAL files being shipped over to the standby before you start streaming replication. The sequence of events I think is supposed to happen is:
I don't think streaming replication has a way to pick up the activity covered in the WAL files.
From: Jeremy Schneider <schneider@xxxxxxxxxxxxxx>
Sent: Monday, November 13, 2017 3:56 PM To: ericd81@xxxxxxxxxxx Cc: PostgreSQL General; Paul Jungwirth Subject: Re: archive_command not being executed Hi Eric,
Thanks for using PostgreSQL! On Fri, Nov 10, 2017 at 9:26 AM, Paul Jungwirth <pj@xxxxxxxxxxxxxxxxxxxxxxxx> wrote: > Oh this has happened to me before. :-) On SB1 you need to set > archive_mode to always (not on). Otherwise it is ignored when running as a > standby. It looks to me like this feature was not added until 9.5 and Eric is running 9.3 :( > On 11/10/2017 09:10 AM, Eric D wrote: >> I have a standby db server (SB1) that will soon become the master. SB1 >> is set up with streaming replication from the current master. I'm >> trying to set up a third server (SB2) as a slave/standby to SB1, so that >> when SB1 becomes the master, there will be a standby for it. First step >> is to get WAL files shipped from SB1->SB2. Eric, >From my reading of the docs and commit logs, standby databases couldn't archive their WALs until 9.5. https://www.postgresql.org/message-id/CANkGpBs7qgAkgQ-OPZY0EsaM6+WUE5MgpyeHCGo_eOQ7tJVyyg@xxxxxxxxxxxxxx http://paquier.xyz/postgresql-2/postgres-9-5-feature-highlight-archive-mode-always/
There is a section in the 9.3 docs about cascading replication: https://www.postgresql.org/docs/9.3/static/warm-standby.html#CASCADING-REPLICATION
It seems to me this is based on streaming replication only. Looks like it's not designed (in 9.3) to start archiving until it becomes a primary. "You will also need to set primary_conninfo in the downstream standby to point to the cascading standby." Are you able to configure a cascading replica by using streaming replication on your 9.3 system, without WAL archiving on the standby? -Jeremy -- http://about.me/jeremy_schneider
|