pgsql: Add test case for an archive recovery corner case.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add test case for an archive recovery corner case.
Date: 2022-02-14 09:34:10
Message-ID: E1nJXkI-0004VV-C3@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Add test case for an archive recovery corner case.

While I was working on a patch to refactor things around xlog.c, I mixed
up EndOfLogTLI and replayTLI at the end of recovery. As a result, if you
recovered to a point with a lower-numbered timeline in a WAL segment
that has a higher TLI in the filename, the end-of-recovery WAL record
was created with invalid PrevTimeLineId. I noticed that while
self-reviewing, but no tests failed. So add a test to cover that corner
case.

Thanks to Amul Sul who also submitted a test case for the same corner
case, although this patch is different from that.

Reviewed-by: Amul Sul, Michael Paquier
Discussion: https://www.postgresql.org/message-id/52bc9ccd-8591-431b-0086-15d9acf25a3f@iki.fi
Discussion: https://www.postgresql.org/message-id/CAAJ_b94Vjt5cXGza_1MkjLQWciNdEemsmiWuQj0d%3DM7JfjAa1g%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/50e5bc582a4371a88218078a2c651d901bf87d96

Modified Files
--------------
src/test/recovery/t/028_pitr_timelines.pl | 176 ++++++++++++++++++++++++++++++
1 file changed, 176 insertions(+)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2022-02-14 13:36:34 Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding
Previous Message Michael Paquier 2022-02-14 08:18:52 Re: pgsql: Database-level collation version tracking

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2022-02-14 09:36:37 Re: Split xlog.c
Previous Message Amit Kapila 2022-02-14 09:24:41 Re: [BUG]Update Toast data failure in logical replication