Re: PANIC during crash recovery of a recently promoted standby

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PANIC during crash recovery of a recently promoted standby
Date: 2018-06-22 04:45:21
Message-ID: 20180622044521.GC5215@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 22, 2018 at 10:08:24AM +0530, Pavan Deolasee wrote:
> On Fri, Jun 22, 2018 at 9:28 AM, Michael Paquier <michael(at)paquier(dot)xyz>
> wrote:
>> So an extra pair of eyes from another committer would be
>> welcome. I am letting that cool down for a couple of days now.
>
> I am not a committer, so don't know if my pair of eyes count, but FWIW the
> patch looks good to me except couple of minor points.

Thanks for grabbing some time, Pavan. Any help is welcome!

> +/*
> + * Local copies of equivalent fields in the control file. When running
> + * crash recovery, minRecoveryPoint is set to InvalidXLogRecPtr as we
> + * expect to replay all the WAL available, and updateMinRecoveryPoint is
> + * switched to false to prevent any updates while replaying records.
> + * Those values are kept consistent as long as crash recovery runs.
> + */
> static XLogRecPtr minRecoveryPoint; /* local copy of
> * ControlFile->minRecoveryPoint */
>
> The inline comment looks unnecessary now that we have comment at the
> top.

I'll fix that.

> @@ -4266,6 +4276,12 @@ ReadRecord(XLogReaderState *xlogreader, XLogRecPtr
> RecPtr, int emode,
> minRecoveryPoint = ControlFile->minRecoveryPoint;
> minRecoveryPointTLI = ControlFile->minRecoveryPointTLI;
>
> + /*
> + * The startup process can update its local copy of
> + * minRecoveryPoint from that point.
> + */
>
> s/that/this

This one too.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2018-06-22 05:31:44 RE: Threat models for DB cryptography (Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key) Management Service (KMS)
Previous Message Pavan Deolasee 2018-06-22 04:38:24 Re: PANIC during crash recovery of a recently promoted standby