agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add recovery test for missing redo segment with backup_label
Date: Mon, 13 Jul 2026 23:16:23 +0000
Message-ID: <E1wjPss-000452-2e@gemulon.postgresql.org> (raw)

Add recovery test for missing redo segment with backup_label

This commit adds a test case for early startup where a backup_label file
uses a checkpoint LSN and a redo LSN located in two different segments,
where the segment of the redo LSN is missing.  This code has never been
covered, and is complex enough that a test case is going to be useful in
the long-term.

Nitin has proposed a more complex approach than what is added by this
commit, by forcing a reuse of the injection points to produce a split
between redo and checkpoint.  This commit relies on the checkpoint and
redo LSNs generated by the first steps of the test, combined with a
generated backup_label, making the whole cheaper.

Author: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAMm1aWZ9Tv=Wrx52_2Ppw+6ULf_twRZuQm=ZWLA_a-kXWykHkQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8f71f64deee6747ad9dea18819018b25424d61e5

Modified Files
--------------
src/test/recovery/t/050_redo_segment_missing.pl | 44 +++++++++++++++++++++++++
1 file changed, 44 insertions(+)



Message-ID: <E1wjPss-000452-2e@gemulon.postgresql.org>
Permalink:  ../E1wjPss-000452-2e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wjPss-000452-2e@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add recovery test for missing redo segment with backup_label
  In-Reply-To: <E1wjPss-000452-2e@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox