Separate HEAP WAL replay logic into its own file

From: "Li, Yong" <yoli(at)ebay(dot)com>
To: "Debnath, Shawn" <sdn(at)ebay(dot)com>, "Shyrabokau, Anton" <antons(at)ebay(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Separate HEAP WAL replay logic into its own file
Date: 2024-06-17 06:20:22
Message-ID: EFE55E65-D7BD-4C6A-B630-91F43FD0771B@ebay.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi PostgreSQL hackers,

For most access methods in PostgreSQL, the implementation of the access method itself and the implementation of its WAL replay logic are organized in separate source files. However, the HEAP access method is an exception. Both the access method and the WAL replay logic are collocated in the same heapam.c. To follow the pattern established by other access methods and to improve maintainability, I made the enclosed patch to separate HEAP’s replay logic into its own file. The changes are straightforward. Move the replay related functions into the new heapam_xlog.c file, push the common heap_execute_freeze_tuple() helper function into the heapam.h header, and adjust the build files.

I hope people find this straightforward refactoring helpful.

Yong

Attachment Content-Type Size
heapam_refactor.patch application/octet-stream 82.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2024-06-17 06:20:33 Re: Pgoutput not capturing the generated columns
Previous Message Amit Langote 2024-06-17 06:20:16 Re: ON ERROR in json_query and the like