Re: Separate HEAP WAL replay logic into its own file

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: "Li, Yong" <yoli(at)ebay(dot)com>
Cc: "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: Re: Separate HEAP WAL replay logic into its own file
Date: 2024-06-17 15:01:08
Message-ID: CAAKRu_Zn5WQm1UA-ickT9h7rZQ_44K3cZdxgu354UarDFjJnig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 17, 2024 at 2:20 AM Li, Yong <yoli(at)ebay(dot)com> wrote:
>
> 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'm not against this change, but I am curious at what inspired this.
Were you looking at Postgres code and simply noticed that there isn't
a heapam_xlog.c (like there is a nbtxlog.c etc) and thought that you
wanted to change that? Or is there some specific reason this would
help you as a Postgres developer, user, or ecosystem member?

- Melanie

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-06-17 15:09:53 Re: Introduce XID age and inactive timeout based replication slot invalidation
Previous Message Tom Lane 2024-06-17 14:56:56 Re: DROP OWNED BY fails to clean out pg_init_privs grants