Re: Rename PageData to XLogPageData

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Rename PageData to XLogPageData
Date: 2024-10-02 17:02:06
Message-ID: 1cb420aa-65ef-44ba-972a-a998b9c5578e@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/10/2024 14:30, Peter Eisentraut wrote:
> I was fiddling a bit with making some Page-related APIs const-proof,
> which might involve changing something like "Page p" to "const PageData
> *p", but I was surprised that a type PageData exists but it's an
> unrelated type local to generic_xlog.c.

Good find

> This patch renames that type to a more specific name XLogPageData.  This
> makes room for possibly adding another PageData type with the earlier
> meaning, but that's not done here.  But I think even without that, this
> patch is a useful little cleanup that makes the code more consistent and
> clear.

+1 for renaming, but -1 on XLogPageData. That sounds like a WAL page,
see XLogPageHeaderData for example. I'd suggest GenericXLogPageData or
just GenericPerPageData or something.

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-10-02 17:16:53 Re: Add support to TLS 1.3 cipher suites and curves lists
Previous Message Masahiko Sawada 2024-10-02 17:02:01 Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation