Re: Start Walreceiver completely before shut down it on standby server. - Mailing list pgsql-hackers

From Ashwin Agrawal
Subject Re: Start Walreceiver completely before shut down it on standby server.
Date
Msg-id CALfoeisPzZs_sGyAOajOGHU49bEi=v1r+DUDZWM+DU1ULf2NNg@mail.gmail.com
Whole thread Raw
In response to Start Walreceiver completely before shut down it on standby server.  (jiankang liu <liujk1994@gmail.com>)
Responses Re: Start Walreceiver completely before shut down it on standbyserver.  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Tue, Dec 10, 2019 at 3:06 AM jiankang liu <liujk1994@gmail.com> wrote:
Start Walreceiver completely before shut down it on standby server.

The walreceiver will be shut down, when read an invalid record in the
WAL streaming from master.And then, we retry from archive/pg_wal again.

After that, we start walreceiver in RequestXLogStreaming(), and read
record from the WAL streaming. But before walreceiver starts, we read
data from file which be streamed over and present in pg_wal by last
time, because of walrcv->receivedUpto > RecPtr and the wal is actually
flush on disk. Now, we read the invalid record again, what the next to
do? Shut down the walreceiver and do it again.

I am missing something here, if walrcv->receivedUpto > RecPtr, why are we getting / reading invalid record?

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Statistics improvements for time series data
Next
From: Alvaro Herrera
Date:
Subject: Re: log bind parameter values on error