Re: Start Walreceiver completely before shut down it on standby server.

From: Ashwin Agrawal <aagrawal(at)pivotal(dot)io>
To: jiankang liu <liujk1994(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Start Walreceiver completely before shut down it on standby server.
Date: 2019-12-10 18:40:53
Message-ID: CALfoeisPzZs_sGyAOajOGHU49bEi=v1r+DUDZWM+DU1ULf2NNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 10, 2019 at 3:06 AM jiankang liu <liujk1994(at)gmail(dot)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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-12-10 18:59:13 Re: log bind parameter values on error
Previous Message Robert Haas 2019-12-10 18:40:39 Re: Statistics improvements for time series data