pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Add test case for an archive recovery corner case.
3+ messages / 3 participants
[nested] [flat]
* pgsql: Add test case for an archive recovery corner case.
@ 2022-02-14 09:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
0 siblings, 1 reply; 3+ messages in thread
From: Heikki Linnakangas @ 2022-02-14 09:34 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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.g...
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(+)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Add test case for an archive recovery corner case.
@ 2022-02-14 14:41 Tom Lane <tgl@sss.pgh.pa.us>
parent: Heikki Linnakangas <heikki.linnakangas@iki.fi>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2022-02-14 14:41 UTC (permalink / raw)
To: Heikki Linnakangas <heikki.linnakangas@iki.fi>; +Cc: pgsql-committers@lists.postgresql.org
Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
> Add test case for an archive recovery corner case.
hoverfly seems not to like this:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hoverfly&dt=2022-02-14%2012%3A36%3A12
# poll_query_until timed out executing this query:
# SELECT '000000020000000000000003' <= last_archived_wal FROM pg_stat_archiver;
# expecting this output:
# t
# last actual query output:
# f
# with stderr:
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 29 just after 1.
[13:22:56] t/028_pitr_timelines.pl ..............
Dubious, test returned 29 (wstat 7424, 0x1d00)
All 1 subtests passed
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Add test case for an archive recovery corner case.
@ 2022-02-14 20:43 Heikki Linnakangas <hlinnaka@iki.fi>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Heikki Linnakangas @ 2022-02-14 20:43 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org
On 14/02/2022 16:41, Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
>> Add test case for an archive recovery corner case.
>
> hoverfly seems not to like this:
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hoverfly&dt=2022-02-14%2012%3A36%3A12
>
Hmm, only hoverfly - and even that succeeded on next run. Some kind of a
flakyness I guess. I'll try to run the test in a loop and see if I can
reproduce it.
- Heikki
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-02-14 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 09:34 pgsql: Add test case for an archive recovery corner case. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2022-02-14 14:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-02-14 20:43 ` Heikki Linnakangas <hlinnaka@iki.fi>
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