On Tue, 3 Nov 2026 at 09:38, shihao zhong <[email protected]> wrote:
>
> Hi Vignesh,
>
> Thanks for catching this, and for the test. It fails on v1 as you
> describe.
>
> v2 drops the flag. _hash_alloc_buckets() now extends the file before
> writing the WAL record, so a checkpoint either replays the record or
> syncs the new block.
>
> ^^^^ is aligned with current heap extend behavior. Another way is to
> use PG_TRY and FINALLY to reset the flag.  I prefer to use
> same mechanism because it is easy to understand in the future.

Thanks for providing the updated version, the patch does not apply to
back branches as back branches use PageSetChecksumInplace instead of
PageSetChecksum. We will need a separate patch for the back branch:
git am v2-0003-Extend-hash-index-before-WAL-logging-new-bucket-p.patch
Applying: Extend hash index before WAL-logging new bucket pages
error: patch failed: src/backend/access/hash/hashpage.c:1032
error: src/backend/access/hash/hashpage.c: patch does not apply

Regards,
Vignesh


Reply via email to