Re: What does it mean by XLOG_BACKUP_RECORD?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What does it mean by XLOG_BACKUP_RECORD?
Date: 2017-06-29 01:49:09
Message-ID: CAB7nPqT+X6ExvQ-nYiYH2vQRV+M65JXX6eJV4jhmg2+J3updHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 29, 2017 at 10:28 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> While reading source codes I found the following comment in xlog.c.
>
> /*
> * Have we passed our safe starting point? Note that minRecoveryPoint is
> * known to be incorrectly set if ControlFile->backupEndRequired, until
> * the XLOG_BACKUP_RECORD arrives to advise us of the correct
> * minRecoveryPoint. All we know prior to that is that we're not
> * consistent yet.
> */
> if (!reachedConsistency && !ControlFile->backupEndRequired &&
> minRecoveryPoint <= lastReplayedEndRecPtr &&
> XLogRecPtrIsInvalid(ControlFile->backupStartPoint))
>
> What does XLOG_BACKUP_RECORED means by? I could not find such XLOG info value.
> Does it mean XLOG_BACKUP_END?

This comment is a thinko, it refers to XLOG_BACKUP_END. This comment
block could be reworded a bit, it looks cleaner to me to say
"ControlFile->backupEndRequired is false" instead of just referring to
the variable itself. Worse, the current comment implies that
minRecoveryPoint is incorrectly set if it is true. Bleh.
--
Michael

Attachment Content-Type Size
xlog-comment-fix.patch application/octet-stream 717 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-06-29 01:55:17 Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)
Previous Message Craig Ringer 2017-06-29 01:44:44 Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)