[COMMITTERS] pgsql: Fix bug in verifying TLI (timeline ID) in WAL page headerduring - Mailing list pgsql-committers

From Fujii Masao
Subject [COMMITTERS] pgsql: Fix bug in verifying TLI (timeline ID) in WAL page headerduring
Date
Msg-id E1cW9BP-00082G-LV@gemulon.postgresql.org
Whole thread Raw
List pgsql-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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: [COMMITTERS] pgsql: Add a new DestReceiver for printing tuples without catalogacces
Next
From: Robert Haas
Date:
Subject: [COMMITTERS] pgsql: Add a SHOW command to the replication command language.