You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A per-instance shared-memory memo that caches the position the last own-instance
WRAP_ANY by-xid durable scan (CR Source 3) matched -- (xid_epoch, raw_xid, origin)
-> {seg, slot, wrap} -- so a peer backend re-validates that one slot in O(1) via
cluster_tt_slot_durable_lookup instead of re-running the O(segments) scan.
Six 8.A safety gates (all default-off; entries=0 is byte-identical):
1. memo non-authoritative: the scn is always a fresh durable re-read.
2. exact-(xid,wrap) re-validation: a recycled/wrap-bumped slot fails -> re-scan.
3. acceptance same-segment rerun: a memo hit runs the PHYSICALLY SAME
cluster_cr_accept_resolved_scn helper (wrap_suspect WRAP_ANY + current horizon
+ sticky retention reliability) the fresh scan runs -> verdict-equivalent by
construction; the memo never short-circuits acceptance.
4. xid_epoch fence: a single monotonic own-instance FullTransactionId epoch makes
a hint from epoch E a key MISS in E+1, before raw_xid can be reused.
5. cross-instance fail-closed: own-instance scans only.
6. COMMITTED-only.
Two modes (cluster.resolver_cache_enabled trust / cluster.resolver_cache_measure
diagnostic), both PGC_POSTMASTER, default off. D1 extends the by-xid resolver with
optional matched-slot out params (NULL = legacy, no TTSlot ABI / catversion change).
§0.6 value gate (measure-first): re-probe hit rate is workload-dependent (high
under retained-snapshot multi-reader; the recycle-heavy pure-write leg re-scans
safely via gate 2). Default off; the non-zero default + sizing are forward 5.58.
Spec: spec-5.55-shared-resolver-cache.md (FROZEN v1.0)
Landed onto post-5.15 main (cherry-pick of v0.115.0-stage5.55 094b84c):
- renumber t/315_cluster_5_55_resolver_cache -> t/316 (resolves collision with
spec-5.15's t/315_cluster_5_15_online_rejoin; nightly range 276-315 -> 276-316)
- reground pg_cluster_state category-count baselines 48 -> 49 across
t/017/t/023/t/024/t/030/t/204/t/205/t/206 (reconfig_join from spec-5.15 +
resolver_cache from spec-5.55 are both always-present categories)
0 commit comments