mirror of
https://github.com/neondatabase/neon.git
synced 2026-07-04 12:40:37 +00:00
This patch adds basic access statistics for historic layers
and exposes them in the management API's `LayerMapInfo`.
We record the accesses in the `{Delta,Image}Layer::load()` function
because it's the common path of
* page_service (`Timline::get_reconstruct_data()`)
* Compaction (`PersistentLayer::iter()` and `PersistentLayer::key_iter()`)
There is a killswitch in pageserver.toml to disable statistics gathering
to support before/after benchmarks. With the killswitch enabled, the
overhead of this feature is the function call and the atomic load.
Preceding PRs:
- #3504 add RequestContext plumbing for layer access stats
This is PR https://github.com/neondatabase/neon/pull/3496