<!-- llms-explorer concept facts · https://llms-explorer.com/tree/pinned-wiredtiger-diagnostic-page-dump-field-semantics/ · pack 2026-11-02 · ~1772 tokens -->

# Pinned WiredTiger diagnostic page-dump field semantics

> Source-anchored research for Pinned WiredTiger diagnostic page-dump field semantics. Run status: COMPLETED.

Parent: [Reconciliation and Page Splitting](https://llms-explorer.com/tree/reconciliation-and-page-splitting/) · 4 facets · 9 facts · page: https://llms-explorer.com/tree/pinned-wiredtiger-diagnostic-page-dump-field-semantics/

## How it works

- At the pinned commit, verify dispatch requests WT_DHANDLE_EXCLUSIVE | WT_BTREE_VERIFY for a single object and for each table in an all-table verification. __session_verify holds checkpoint and schema locks, and the pinned API marks verify as requiring exclusive access. The separately versioned WiredTiger 11.0.0 API explains that open cursors or another use of the target data source can cause EBUSY; the pinned code is the authority for its lock path. (high confidence) — [source](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/session/session_api.c) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/include/wiredtiger.h.in) · [also](https://source.wiredtiger.com/11.0.0/struct_w_t___s_e_s_s_i_o_n.html) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/docs/command-line.dox)
- At the pinned commit, diagnostic dsk_mem_size is page->dsk->mem_size and is printed only when page->dsk is non-NULL. WT_PAGE_HEADER defines mem_size as the actual unrounded, unaligned bytes consumed by the disk image when instantiated in memory. It therefore does not report the compressed block length or allocation-rounded physical disk space. (medium confidence) — [source](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_debug.c) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/include/btmem.h)
- Percona's May 18, 2021 firsthand wt build guide chooses WiredTiger source branches to match the MongoDB data version and discusses required compression libraries and connection configuration. This independent source supports keeping source/build provenance explicit when interpreting dumps; it does not verify the commissioned commit's field implementation or establish compatibility with any deployed binary. (low confidence) — [source](https://www.percona.com/blog/wiredtiger-file-forensics-part-1-building-wt/)

## Problems, failure modes and limitations

- At the pinned commit, the CLI documents verify -d dump_pages, and the API describes dump_pages as dumping in-memory page contents during verification. __verify_config returns ENOTSUP for dump_pages or dump_blocks when HAVE_DIAGNOSTIC is absent, with the error that the WiredTiger library was not built in diagnostic mode. In a diagnostic build, the dump_pages branch calls __wti_debug_page, while dump_blocks calls __wti_debug_disk. (medium confidence) — [source](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/docs/command-line.dox) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/include/wiredtiger.h.in) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_vrfy.c)

## Comparisons and alternatives

- WT-12233 records readability and script-parsing problems in an older dump_pages format and proposes standardized output. The pinned implementation emits labels including disk_img, dsk_mem_size, entries, and page_mem_size. Historical examples using memory-size should therefore be interpreted against their source version rather than treated as a stable cross-version text protocol. (high confidence) — [source](https://jira.mongodb.org/browse/WT-12233) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_debug.c)
- At the pinned commit, diagnostic page_mem_size reads page->memory_footprint with an atomic relaxed load; WT_PAGE describes that field as memory attached to the page. Row-leaf allocation includes sizeof(WT_PAGE) plus the WT_ROW array, and page instantiation accounts for the allocated disk image separately. Thus page_mem_size represents tracked page memory rather than an alias of dsk_mem_size. (medium confidence) — [source](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_debug.c) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/include/btmem.h) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_page.c)
- The pinned __wti_page_inmem explicitly bases disk-image accounting on dsk->mem_size rather than the actual buffer allocation, although those values may differ, so discard accounting can match. Treat this as implementation accounting, not an exact allocator-buffer measurement. The same routine accounts shared disk images differently in aggregate cache totals while still counting the shared image in the page footprint. (low confidence) — [source](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_page.c)

## Facts and statements

- At the pinned WiredTiger commit, __debug_page_metadata prints page->entries for WT_PAGE_ROW_LEAF; internal pages instead use pindex->entries. The row-leaf dumper separately traverses insert skiplists and update chains, so this metadata count must not be read as a snapshot-visible live-record count or a count of every item printed in the dump. (high confidence) — [source](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_debug.c) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/include/btmem.h) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_page.c)
- At the pinned commit, the entries member of the u union in WT_PAGE_HEADER counts cells. The page-instantiation comment attributes a one-to-one physical-entry mapping to the no-empty-values condition. The adjacent executable branches instead use the cell count directly for WT_PAGE_EMPTY_V_ALL and halve it for WT_PAGE_EMPTY_V_NONE; the mixed empty/nonempty case calls __inmem_row_leaf_entries, which counts key and overflow-key cells while ignoring value cells. The comment and executable branches are separately attributed positions at the same revision. Their disagreement prevents treating the comment as an unconditional conversion rule. (high confidence) — [source](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/include/btmem.h) · [also](https://raw.githubusercontent.com/wiredtiger/wiredtiger/1ce38e0784c9e62d52ff61ccc7965f438a5ee05c/src/btree/bt_page.c)
