model-writtenrun 7367 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro proposed avoiding repeated relation-size syscalls with backend-local cached sizes and shared invalidation counters in #1; Andres Freund and David Rowley requested benchmarks in #2 and #4, while Edmund Horner described substantial NFS overhead in #3.
- Thomas posted an experimental md.c implementation in #5, acknowledging broken initdb and no measurable pgbench improvement; Kirk Jamison subsequently demonstrated reduced syscall counts and improved custom-planning time on a heavily partitioned workload in #7.
- Kirk proposed storing sizes directly in shared memory in #9 and #14, but Andres Freund warned about per-relation allocation complexity in #15, and Kyotaro Horiguchi favored a small fixed set of shared invalidation counters in #17.
- Thomas revived the work around recovery in #19, where a single process could cache sizes without shared invalidation, and posted the rewritten smgr-layer patch in #21, generalizing FSM and VM caching to all forks.
- Reports of expensive Windows size probes in #22 and an anonymous tester reducing crash recovery from 65 seconds to 41 seconds in #23 strengthened the performance case, and Thomas rebased the recovery patch in #24.
- Thomas committed #24 as c5315f4f44 with only comment and commit-message edits; his announcement in #25 reported recovery lseeks falling from 1,080,661 to 85 while leaving ordinary-backend caching for later work.
- Thomas then posted an incremental shared-invalidation experiment in #26, allowing selected callers to request relaxed cached sizes whose freshness depended on existing memory barriers; in #29, he defended incremental improvements while agreeing with Konstantin Knizhnik's broader shared-cache goals.
- In #30, Thomas replaced invalidated local caches with a shared pool that retained authoritative relation sizes until successful fsync, addressing filesystems that could lose unsynced extensions; he explained in #33 that this storage-level mechanism was distinct from a shared catalog cache.
- Amit Kapila questioned snapshot freshness for nested relation accesses in #37, prompting Thomas to separate the lock-free fast path from the main shared-pool patch in #38 so the basic design could be reviewed independently.
- Andy Fan examined eviction and fsync behavior in #39, #41 and #45; Thomas clarified in #43 and #48 that successful fsync makes forgetting a shared size safe, while failure must preserve the entry and report an error.
- 陈佳昕(步真) identified missing DROP DATABASE cleanup in #42 and supplied inline corrections for syncing-state and stale fast-path problems in #46; Thomas incorporated these into #49, adding condition-variable waiting and generation invalidation.
- Andres Freund's detailed review in #47 recommended deriving pool capacity from existing settings, integrating cleaning with the checkpointer, and adding spinlock backoff; Thomas acknowledged in #48 that background cleaning remained a major missing component.
- 陈佳昕(步真) raised additional tablespace and recovery cleanup cases in #51, then supplied a usage-count replacement-policy delta in #52.
- Thomas integrated that delta as the third patch in #54, added Andres's spinlock backoff, and adapted the series to enable the buffer-dropping optimization during normal operation; he explicitly ruled out PostgreSQL 14 because background cleaning and other review issues remained unresolved.
- Thomas posted an otherwise unchanged rebase in #55 and considered a reusable cache-replacement component; the recovery-only change remained landed while the three-patch shared-cache series stayed under review.
- The thread ends with Anastasia Lubennikova reviewing the first patch in #56, proposing separate handling for temporary relations, questioning pool sizing and shared-memory choices, and identifying CREATE DATABASE and ALTER DATABASE SET TABLESPACE as additional cases needing attention.