Mixed field in table 70.3

Started by PG Bug reporting formalmost 4 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/storage-page-layout.html
Description:

The 7th line states:
pd_pagesize_version uint16 2 bytes Page size and layout version number
information

In fact there are two smallints, so the table should show two attributes:
pd_pagesize uint16 2 bytes Page size
version uint16 2 bytes Layout version number information

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: Mixed field in table 70.3

PG Doc comments form <noreply@postgresql.org> writes:

Page: https://www.postgresql.org/docs/14/storage-page-layout.html

The 7th line states:
pd_pagesize_version uint16 2 bytes Page size and layout version number
information

In fact there are two smallints, so the table should show two attributes:
pd_pagesize uint16 2 bytes Page size
version uint16 2 bytes Layout version number information

No, I don't think so --- this documentation matches the actual code,
in bufpage.h:

...
LocationIndex pd_lower; /* offset to start of free space */
LocationIndex pd_upper; /* offset to end of free space */
LocationIndex pd_special; /* offset to start of special space */
uint16 pd_pagesize_version;
TransactionId pd_prune_xid; /* oldest prunable XID, or zero if none */
ItemIdData pd_linp[FLEXIBLE_ARRAY_MEMBER]; /* line pointer array */
...

regards, tom lane