pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix bug in verifying TLI (timeline ID) in WAL page header during
Date: Tue, 24 Jan 2017 22:03:19 +0000
Message-ID: <E1cW9BP-00082G-LV@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix bug in verifying TLI (timeline ID) in WAL page header during recovery..

Previously ValidXLOGHeader() could not handle properly the case where
we re-read the WAL segment after reading its subsequent segment having
larger TLI. This case can happen, for example, when the WAL record is split
across two segments having different TLI. In this case, since the segment
we're re-reading has the smaller TLI than its subsequent segment we've
already read, ValidXLOGHeader() reported an error "out-of-sequence TLI"
even though TLI sequence was valid (i.e., TLI doesn't go backwards across
successive WAL pages and segments).

This issue was fixed by commit 7fcbf6a405ffc12a4546a25b98592ee6733783fc
in 9.3 or later though there is no mention to the bug fix in its commit log.
It changed the WAL check code so that it verifies TLI for pages that are
later than the last remembered LSN. This patch applies the same change to
9.2 where the issue still existed.

Author: Takayuki Tsunakawa and Amit Kapila
Reviewed-By: Robert Haas
Discussion: https://postgr.es/m/0A3221C70F24FB45833433255569204D1F5E15E5@G01JPEXMBYT05

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/38bec18056b86f793afa642b2f991ea6ec1b8491

Modified Files
--------------
src/backend/access/transam/xlog.c | 58 +++++++++++++++------------------------
1 file changed, 22 insertions(+), 36 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1cW9BP-00082G-LV@gemulon.postgresql.org>
Permalink:  ../E1cW9BP-00082G-LV@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cW9BP-00082G-LV@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: fujii@postgresql.org
  Subject: Re: pgsql: Fix bug in verifying TLI (timeline ID) in WAL page header during
  In-Reply-To: <E1cW9BP-00082G-LV@gemulon.postgresql.org>
  References: <E1cW9BP-00082G-LV@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