Re: pg15b3: recovery fails with wal prefetch enabled - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: pg15b3: recovery fails with wal prefetch enabled
Date
Msg-id CA+hUKG+jiB5W7-N4zhvpUXwQ_XZgYLioWxPcXKvmKw4XYKUF4g@mail.gmail.com
Whole thread Raw
In response to Re: pg15b3: recovery fails with wal prefetch enabled  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Thu, Sep 1, 2022 at 12:53 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> Yes, I have a copy that reproduces the issue:

That's good news.

So the last record touching that page was:

> rmgr: Heap2       len (rec/tot):     59/    59, tx:          0, lsn: 1201/1CAF84B0, prev 1201/1CAF8478, desc: VISIBLE
cutoffxid 3678741092 flags 0x01, blkref #0: rel 1663/16881/2840 fork vm blk 0, blkref #1: rel 1663/16881/2840 blk 53
 

I think the expected LSN for that page is past the end of that record,
so 0x1CAF84B0 + 59 = 0x1caf84eb which rounds up to 0x1CAF84F0, and
indeed we see that in the restored page when recovery succeeds.

Next question: why do we think the WAL finishes at 1201/1CADB730 while
running that checkpoint?  Looking...



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Add tracking of backend memory allocated to pg_stat_activity
Next
From: Bruce Momjian
Date:
Subject: Re: SELECT documentation