PolarDB for PostgreSQL (Compatible with Oracle) stores table data in heap files. Each table maps to one or more data files on disk, organized as a hierarchy of pages and tuples.

Storage hierarchy
| Item | Description |
|---|---|
| table files | One or more data files that together make up a table. A new data file is created when a data file exceeds 1 GB. |
| file | A data file that contains multiple pages. |
| page | A fixed-size block (also called a data block) that contains multiple tuples. |
| page header | Metadata at the start of each page. See Page header fields. |
| tuple | A row version. In a multiversion concurrency control (MVCC) context, a single logical row can have multiple tuple versions. |
| tuple header | Metadata at the start of each tuple that stores MVCC control information. See Tuple header fields. |
Page header fields
The PageHeaderData structure contains the following fields.
| Field | Description |
|---|---|
pd_lsn | The log sequence number (LSN) of the last write-ahead logging (WAL) record that modified this page. |
pd_checksum | The page checksum. |
pd_flags | Flag bits. |
pd_lower | Offset from the page start to the end of the line pointer array. This marks the start of free space. Line pointers grow from this boundary toward the end of the page. |
pd_upper | Offset from the page start to the start of the heap tuple area. This marks the end of free space. Tuples are stored from this boundary backward toward the header. |
pd_special | Offset from the page start to the beginning of special space. |
pd_pagesize_version | The page size and layout version number. |
pd_prune_xid | The earliest XMAX that is not deleted from the page. If none exists, the value is 0. |
Tuple header fields
The HeapTupleHeaderData structure contains the following fields.
| Field | Description |
|---|---|
t_xmin | The XID of the transaction that inserted this tuple. |
t_xmax | The XID of the transaction that deleted this tuple. |
t_cid | The command ID (CID) of the INSERT or DELETE command within the inserting transaction. For example, in a transaction that runs three INSERT statements sequentially, the first statement sets t_cid to 0, the second to 1, and so on. |
t_ctid | The tuple ID (TID) of this tuple or a later version of the same row. Points to the current tuple if no newer version exists. |
t_infomask | Flag bits. |
t_infomask2 | Extra flag bits. |
t_hoff | Offset from the tuple start to the actual user data. |
| tuple data | The actual column values stored in the tuple. |