pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Log the correct ending timestamp in recovery_target_xid mode.
Date: Thu, 19 Jan 2023 17:24:02 +0000
Message-ID: <E1pIYdu-004UA8-63@gemulon.postgresql.org> (raw)

Log the correct ending timestamp in recovery_target_xid mode.

When ending recovery based on recovery_target_xid matching with
recovery_target_inclusive = off, we printed an incorrect timestamp
(always 2000-01-01) in the "recovery stopping before ... transaction"
log message.  This is a consequence of sloppy refactoring in
c945af80c: the code to fetch recordXtime out of the commit/abort
record used to be executed unconditionally, but it was changed
to get called only in the RECOVERY_TARGET_TIME case.  We need only
flip the order of operations to restore the intended behavior.

Per report from Torsten Förtsch.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/CAKkG4_kUevPqbmyOfLajx7opAQk6Cvwkvx0HRcFjSPfRPTXanA@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1b9a0b96a8701ddcd147836241f89d616772d332

Modified Files
--------------
src/backend/access/transam/xlog.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1pIYdu-004UA8-63@gemulon.postgresql.org>
Permalink:  ../E1pIYdu-004UA8-63@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pIYdu-004UA8-63@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Log the correct ending timestamp in recovery_target_xid mode.
  In-Reply-To: <E1pIYdu-004UA8-63@gemulon.postgresql.org>
  References: <E1pIYdu-004UA8-63@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox