Re: postgres hot-standby questions. - Mailing list pgsql-admin

From Graeme B. Bell
Subject Re: postgres hot-standby questions.
Date
Msg-id 0A110B23-141A-4956-BD91-6301C7F5C08D@skogoglandskap.no
Whole thread Raw
In response to Re: postgres hot-standby questions.  (Scott Ribe <scott_ribe@elevated-dev.com>)
List pgsql-admin
>
>> Let's imagine someone follows your advice but is already running a PITR archive with archive_timeout. The
recommendedtimeout is 1 minute. Every minute their server generates a new WAL segment.  
>
> Yeah, I'm always assuming streaming replication. If you know you have a delay in replication, you'd better remember
that;-) 

If we agree on that assumption, then:

There is definitely a race condition between the generation of WAL by archive_timeout and any SQL-based check that you
mightdo against the server to see it's WAL state before shutting down, which can result in WAL that is not synchronised
betweenmaster and standby (and which you do not know is not synchronised). 

And a possible further race condition between the generation of WAL by archive timeout and the shutdown process,
dependingon at what point in the shutdown process the server ceases to generate new WAL, which can also result in WAL
thatis not synchronised between master and standby (and which you do not know is not synchronised). 

"Similar" or "Maybe the same" isn't going to be good enough here for reliable behaviour.

Graeme Bell



pgsql-admin by date:

Previous
From: "Graeme B. Bell"
Date:
Subject: Re: postgres hot-standby questions.
Next
From: Scott Ribe
Date:
Subject: Re: postgres hot-standby questions.