On Wed, Jun 22, 2022 at 5:06 PM Bagga, Rishu <bagrishu@amazon.com> wrote:
> We are suggesting a minimal BufferedObject page header
> to be the following, overlapping with the key fields near the beginning
> of the regular PageHeaderData:
>
> typedef struct BufferedObjectPageHeaderData
> {
> PageXLogRecPtr pd_lsn;
> uint16_t pd_checksum;
> uint16_t pd_flags;
> uint16_t pd_pagesize_version;
> } BufferedObjectPageHeaderData;
>
> For reference, the regular page header looks like the following:
> typedef struct PageHeaderData
> {
> PageXLogRecPtr pd_lsn;
> uint16_t pd_checksum;
> uint16_t pd_flags;
> LocationIndex pd_lower;
> LocationIndex pd_upper;
> LocationIndex pd_special;
> uint16_t pd_pagesize_version;
> TransactionId pd_prune_xid;
> ItemIdDataCommon pd_linp[];
> } PageHeaderData;
>
> After careful review, we have trimmed out the heap and index specific
> fields from the suggested header that do not add any value to SLRU
> components. We plan to use pd_lsn, pd_checksum, and pd_pagesize_version
> in the same way that they are in relational pages. These fields are
> needed to ensure consistency, durability and page correctness
I think that it's not worth introducing a new page header format to
save 10 bytes per page. Keeping things on the same format is likely to
save more than the minor waste of space costs.
--
Robert Haas
EDB: http://www.enterprisedb.com