[GENERAL] clarification about standby promotion - Mailing list pgsql-general

From Benoit Lobréau
Subject [GENERAL] clarification about standby promotion
Date
Msg-id CAPE8EZ5NUH4G2Z7M4TMhLghGGDDot0cb4c9vz+vH75i-ME5Tig@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] clarification about standby promotion  (Venkata B Nagothi <nag1010@gmail.com>)
List pgsql-general

Hi, 


I would like to clarify something about standby promotion. From the sentence below. I understand that, during the promotion process, postgres will replay all the available wals (from the archive or pg_xlog). 


https://www.postgresql.org/docs/9.5/static/warm-standby.html#STREAMING-REPLICATION


25.2.2. Standby Server Operation
...
Standby mode is exited and the server switches to normal operation when pg_ctl promote is run or a trigger file is found (trigger_file). Before failover, any WAL immediately available in the archive or in pg_xlog will be restored, but no attempt is made to connect to the master.

I have seen several articles like this one (https://www.enterprisedb.com/switchoverswitchback-postgresql-93) where they say that pg_last_xlog_receive_location() and pg_last_xlog_replay_location() should be checked before promotion. I don't understand why since they will be replayed anyway. Did something changed since 9.3 about this ?

Thanks for you help. please excuse my poor english.
 
Benoit

pgsql-general by date:

Previous
From: Paul Ramsey
Date:
Subject: Re: [GENERAL] Running out of memory the hard way ...
Next
From: PAWAN SHARMA
Date:
Subject: [GENERAL] LDAP configuration