9.3. Internal Layout of WAL Segment
A WAL segment is a 16 MB file by default.
It is internally divided into pages of 8192 bytes (8 KB).
The first page contains a header defined by the XLogLongPageHeaderData structure.
In contrast, all subsequent pages contain page information defined by the XLogPageHeaderData structure.
Following the page header, XLOG records are written into each page sequentially from the beginning.
See Figure 9.7.
Figure 9.7. Internal layout of a WAL segment file.
The XLogLongPageHeaderData structure and the XLogPageHeaderData structure are defined in xlog_internal.h. The description of these structures is omitted here as they are not required for the following sections.