Re: pg_rewind and hint bits leads to visibility corruption

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: Jan Nidzwetzki <jan(at)planetscale(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Tom Pang <tom(at)planetscale(dot)com>
Subject: Re: pg_rewind and hint bits leads to visibility corruption
Date: 2026-11-21 17:56:23
Message-ID: CAGRkXqSEQHkvL5Qgv=Ydy30Lo30+7brMMbtkiUHDO8=u3XWE2g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Jan

I have some concerns about wal bloating here.

MarkBufferDirtyHint() forces a WAL record on a dirty page, even for
hints that don't depend on a transaction outcome. The pd_prune_xid
update in heap_page_prune_and_freeze() hits this on every page. With 1M
rows committed before the last checkpoint, the first scan after
promotion wrote 85 MB.

For Zsolt's 2:

xlog_redo() already gets the oldest prepared xid from
PrescanPreparedTransactions()
for a shutdown checkpoint, we can just reuse this?

Thanks,
Shihao

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-11-21 18:51:38 Re: pg_rewind and hint bits leads to visibility corruption
Previous Message shihao zhong 2026-11-21 17:30:36 Re: BUG #19858: pg_dump --clean --if-exists fails on NOT VALID domain constraint