| From: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
|---|---|
| To: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
| Cc: | pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Reduce WAL volume for heap tuple hint bits |
| Date: | 2026-08-17 13:53:26 |
| Message-ID: | CAEze2WhVDF1Tt4wwthBWwUNw_H6kFy6PE=nh0VsBUpXkUyoJLQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 5 Aug 2026 at 11:18, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
> Hi hackers,
>
> Heap tuple visibility hint bits avoid repeated transaction status
> lookups. With wal_log_hints enabled, PostgreSQL currently logs a
> full-page image for the first hint bit change to a page after each
> checkpoint. This can generate considerably more WAL than the hint bits
> themselves require.
>
> My main motivation comes from our PostgreSQL fork with compute/storage
> separation, where this WAL volume is costly. The same overhead also
> occurs in vanilla clusters with wal_log_hints enabled.
> The concept is mostly viable when torn pages are not a problem.
I'd say it's _only_ viable when torn writes are not a problem. Torn
writes may [^1] leave subsequent reads with actual garbage on the
page, not just an older version of the page, and without an FPI you
can't recover from that. I don't think there's a more accurate GUC
for "I need torn page protection" than the "full_page_writes" GUC, so
this patch seems like a non-starter to me.
Kind regards,
Matthias van de Meent
Databricks (https://www.databricks.com)
[^1] Torn write behaviour depends on the FS and possibly the disk
used, and I've seen reports of actual garbage on pages after power
loss. Local testing with anything less than that is probably not
representative of the whole problem space.
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Bertrand Drouvot | 2026-08-17 13:52:49 | Re: basebackup: do not verify checksums on pages written before enabling checksums |