Skip to main content

Module page

Module page 

Source
Expand description

See bufpage.h and bufpage.c.

§Page layout

+--------+---------------+----------------+--------------+---------+
| header | line pointers |→  free space  ←| tuple data   | special |
+--------+---------------+----------------+--------------+---------+
0        24          pd_lower         pd_upper     pd_special    8192

Fields are little-endian. Postgres uses the machine’s byte order, which is little-endian on x86-64 and ARM64, so there the bytes match Postgres’s.

Structs§

Header
LocationIndex
Offset of a byte within a page. Postgres’s LocationIndex.
Page
An 8 KB block, exactly as stored on disk.
PageFlags
The bits of pd_flags.
ValidatedPage

Enums§

InvalidHeader
Why a header fails the checks Postgres runs before letting a page into the buffer pool.
PageError

Constants§

HEADER_SIZE
PAGE_LAYOUT_VERSION
Version of this layout, kept in the low byte of pd_pagesize_version. Postgres’s PG_PAGE_LAYOUT_VERSION, which has been 4 since Postgres 8.3.