[PATCH] Fix references in comments, and sync up heap_page_is_all_visible() with heap_page_prune_and_freeze()

From: Gregory Burd <greg(at)burd(dot)me>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Fix references in comments, and sync up heap_page_is_all_visible() with heap_page_prune_and_freeze()
Date: 2025-05-06 15:39:07
Message-ID: O2XDwX3fiyQPKP740FHzy4_U4AXAQG7BM7z05YJ7lDn60o8ylIPTeM-3gaEdTrCKwIbkFofprj9IOtp6LN9WueiNUw5sjnx_H_E8AnSya2M=@burd.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While working on [1] I found an outdated comment in heap_page_is_all_visible() and two other small fixes.

0001: Updates that comment so future authors know that this "stripped down function" should retain the logic in heap_page_prune_and_freeze(), not lazy_scan_prune() as was the case before 6dbb490.
0002: Mimics the same loop logic as in heap_page_is_all_visible() so as to a) stay in sync and b) benefit from the mentioned CPU prefetching optimization.
0003: Moves the ItemSetPointer() just a bit further down in the function again to a) stay in sync and b) to sometimes avoid that tiny overhead.

best,

-greg

PS: per-community standards I've switched to my personal email address rather than gregburd(at)amazon(dot)com

[1] https://www.postgresql.org/message-id/flat/78574B24-BE0A-42C5-8075-3FA9FA63B8FC(at)amazon(dot)com

Attachment Content-Type Size
v1-0001-Fix-references-in-comments-in-heap_page_is_all_vi.patch application/octet-stream 1.8 KB
v1-0003-Move-ItemPointerSet-call-to-better-match-heap_pag.patch application/octet-stream 1.4 KB
v1-0002-Reverse-loop-to-match-counterpart-and-optimize-fo.patch application/octet-stream 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2025-05-06 15:45:20 Re: doc pg_constraint.convalidated column description need update
Previous Message Nathan Bossart 2025-05-06 15:17:39 Re: PostgreSQL 18 Beta 1 release announcement draft