From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Format:SQLite database file" |
|---|
| claim | "In auto-vacuum SQLite databases, pointer-map pages (page 2 and every (U/5+1)-th page after it) hold 5-byte entries, a type byte and a big-endian u32 parent page, one per following page: 1 root page, 2 free page, 3 first overflow page (parent = page with the cell), 4 later overflow page (parent = previous overflow page), 5 non-root B-tree page." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:SQLite database file" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "SQLitePtrmapType" |
|---|
| underlying_type | "uint8_t" |
|---|
| values | | name | "PTRMAP_ROOTPAGE" |
|---|
| value | "1" |
|---|
|
| name | "PTRMAP_FREEPAGE" |
|---|
| value | "2" |
|---|
|
| name | "PTRMAP_OVERFLOW1" |
|---|
| value | "3" |
|---|
|
| name | "PTRMAP_OVERFLOW2" |
|---|
| value | "4" |
|---|
|
| name | "PTRMAP_BTREE" |
|---|
| value | "5" |
|---|
|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "PTRMAP_PTROFFSET and the PTRMAP_* types with their meaning" |
|---|
| repo | "https://github.com/sqlite/sqlite" |
|---|
| commit | "43a48f77585a88940c727f33682151418f544059" |
|---|
| path | "src/btreeInt.h" |
|---|
| lines | "630-668" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "A 65536-byte-page auto_vacuum=FULL database from SQLite 3.53.1 had header 0x34 non-zero and page 2 as a pointer-map page, followed by the table's root and leaves" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Pointer-map entry type" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T19:34:48.749Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T13:01:49.101Z" |
|---|
| summary | "Read btreeInt.h 664-668: PTRMAP_ROOTPAGE..BTREE 1-5, PTRMAP_PTROFFSET is 5*(pgno-pgptrmap-1); complete true" |
|---|
| changed | |
|---|
|
|
|---|