Skip to content

PostgreSQL Code-Analysis Coverage Map

Contents:

This is the coverage map for knowledge/code-analysis/postgres/. It answers a single question: what’s planned, what’s written, and what’s deliberately out of scope?

It is the PostgreSQL analog of cubrid-coverage.md, with one difference of kind: the CUBRID tree was tracked after most docs already existed, so its map reads “covered / open.” This PostgreSQL tree is being built from a fixed authoring backlog, so this map reads “planned / in progress / done” against that backlog. Every module slug below is drawn from the analysis plan’s module catalog — none are invented here.

It deliberately is not:

  • A per-doc catalog with summaries — that is README.md, generated from each doc’s summary: frontmatter.
  • An architectural map of the system — that is postgres-architecture-overview.md, the seven-axis router that leads with the shared-memory-machine thesis and forward-references every detail doc.
  • A complete enumeration of every PostgreSQL source file. Coverage here is pitched at module granularity: one planned postgres-<module>.md per row. We do not track per-symbol gaps — the per-doc position-hint tables already pin canonical symbols.

Use this doc when planning the next authoring batch, or when you want a single-screen answer to “is X planned/written yet, or is it out of scope?”.

The whole tree is written against the cloned source at REL_18_STABLE, commit 273fe94 (REL_18_4-39-g273fe94852b, PostgreSQL 18.x) under /data/hgryoo/references/postgres. The version pin is durable-over-current: a released stable branch so the per-doc “Source verification (as of )” records do not rot when a beta churns.

PG18 features are in scope — async I/O (storage/aio/), WAL summarization, incremental backup, and the shared-memory cumulative-stats subsystem (introduced PG15). PG19-only items are out of scope and must not be asserted (see Non-goals). references: frontmatter paths are written relative to that tree with the full src/... prefix (e.g. src/backend/access/transam/xlog.c).

The tree has four doc types (the first three mirror CUBRID; the fourth is new for PostgreSQL):

TypeShapeFrontmatter marker
Module doc7-section template (Theoretical Background → Common DBMS Design → PostgreSQL’s Approach → Source Walkthrough → Source verification → Beyond PostgreSQL → Sources)subcategory: <subcat>
Overview docrouter / axis shape (not 7-section)subcategory: overview
Detail docchapter-by-chapter deep dive companiondoc_type: detail
Evolution docversion-by-version progression of one subsystemdoc_type: evolution
StatusMeaning
donewritten, EN reviewer loop closed (KO mirror may trail)
in progressbeing authored now
plannedin the backlog, not yet started

The campaign is now complete. All 117 module docs, all 15 overview/coverage/status docs (including this map), and all 7 evolution docs are done — EN authored, KO mirrored, meta frontmatter present. 13 PG-relevant research papers have been ingested into knowledge/research/dbms-papers/.

The campaign is complete: 117 module docs + 15 overview/coverage/status docs (1 architecture overview + 13 section-overview routers + this coverage map + 1 translation-status doc) + 7 evolution docs = 139 docs total, all written EN+KO+meta against REL_18_STABLE (commit 273fe94). This is broader than the CUBRID baseline (~88 true module docs) by design — PostgreSQL has more first-class subsystems (pluggable access methods, a real extensibility surface, logical replication, a cumulative-stats subsystem). Korean mirrors live under knowledge/ko/code-analysis/postgres/. 13 PG-relevant research papers have been ingested into knowledge/research/dbms-papers/ (design-of-postgres, implementation-of-postgres, postgres-storage-system, postgres-data-model, postgres-next-generation, ssi-ports-grittner, ssi-cahill, making-si-serializable, berenson-isolation, gist, lehman-yao, seltzer-yigit-hash, fong-optimizer).

The “P” column is the cross-reference priority from the plan’s module catalog (1 = write first). The “Source anchor” column names the canonical source roots for that module (symbols, not lines).

Doc (slug)Source anchorPStatus
postgres-architecture-overviewseven-axis spine; postmaster/, storage/ipc/, access/transam/, miscadmin.h1done
postgres-coverage— (this map)2done
postgres-overview-storage-enginerouter over storage-engine2done
postgres-overview-txn-recoveryrouter over txn-recovery2done
postgres-overview-query-processingrouter over query-processing2done
postgres-overview-server-architecturerouter over server-architecture2done
postgres-overview-monitoring-statsrouter over monitoring-stats3done
postgres-overview-system-catalogrouter over system-catalog3done
postgres-overview-ddl-schemarouter over ddl-schema3done
postgres-overview-replication-harouter over replication-ha3done
postgres-overview-client-protocolrouter over client-protocol3done
postgres-overview-extensibilityrouter over extensibility3done
postgres-overview-base-infrarouter over base-infra3done
postgres-overview-i18n-textrouter over i18n-text3done
postgres-overview-utilitiesrouter over utilities3done

Source roots: access/{heap,nbtree,gin,gist,spgist,brin,hash,index,table,common,tablesample}, storage/{buffer,smgr,page,freespace,file,large_object,aio}.

Doc (slug)Source anchorPStatus
postgres-page-layoutstorage/page/{bufpage,checksum}.c, include/storage/{bufpage,itemptr}.h1done
postgres-buffer-managerstorage/buffer/{bufmgr,freelist,buf_init,localbuf}.c, README1done
postgres-smgr-mdstorage/smgr/{smgr,md}.c2done
postgres-aiostorage/aio/* (PG18 async I/O)2done
postgres-table-amaccess/table/*, include/access/tableam.h1done
postgres-heap-amaccess/heap/{heapam,heapam_handler,hio,pruneheap}.c, README.HOT1done
postgres-toastaccess/common/{toast_internals,detoast,toast_compression}.c, access/heap/heaptoast.c2done
postgres-visibility-mapaccess/heap/visibilitymap.c2done
postgres-free-space-mapstorage/freespace/*3done
postgres-nbtreeaccess/nbtree/*, README1done
postgres-ginaccess/gin/*, README3done
postgres-gistaccess/gist/*, README3done
postgres-spgistaccess/spgist/*, README4done
postgres-brinaccess/brin/*, README4done
postgres-hash-indexaccess/hash/*, README4done
postgres-index-amaccess/index/*, include/access/amapi.h2done
postgres-table-samplingaccess/tablesample/*, include/access/tsmapi.h4done
postgres-data-checksumsstorage/page/checksum.c, common/checksum_helper.c, src/bin/pg_checksums3done
postgres-large-objectsstorage/large_object/*, libpq/be-fsstubs.c4done
postgres-sequencesaccess/sequence/*, commands/sequence.c3done

Source roots: access/transam/*, storage/ipc/procarray.c, commands/vacuum*, utils/time/snapmgr.c.

Doc (slug)Source anchorPStatus
postgres-mvcc-snapshotsutils/time/snapmgr.c, access/heap/heapam_visibility.c, storage/ipc/procarray.c1done
postgres-procarraystorage/ipc/procarray.c (owns procarray internals; mvcc-snapshots references it)1done
postgres-xactaccess/transam/xact.c, README1done
postgres-xlog-walaccess/transam/{xlog,xloginsert,xlogreader}.c, README1done
postgres-wal-records-rmgraccess/transam/{rmgr,xlogutils,generic_xlog}.c, access/rmgrdesc/*3done
postgres-slruaccess/transam/slru.c (substrate)2done
postgres-clog-commit-tsaccess/transam/{clog,subtrans,commit_ts}.c2done
postgres-multixactaccess/transam/multixact.c3done
postgres-two-phase-commitaccess/transam/{twophase,twophase_rmgr}.c2done
postgres-recovery-redoaccess/transam/{xlogrecovery,xlogprefetcher,timeline}.c1done
postgres-checkpointaccess/transam/xlog.c (ckpt path), postmaster/checkpointer.c2done
postgres-vacuumcommands/{vacuum,vacuumparallel}.c, access/heap/vacuumlazy.c1done
postgres-autovacuumpostmaster/autovacuum.c2done
postgres-xid-wraparound-freezeaccess/heap/heapam.c (freeze), access/transam/varsup.c2done

Source roots: parser, rewrite, optimizer, executor, nodes, statistics, jit.

Doc (slug)Source anchorPStatus
postgres-parserparser/{gram.y,scan.l,parse_*}.c1done
postgres-analyze-transformparser/analyze.c, parser/parse_*2done
postgres-rewriterrewrite/{rewriteHandler,rewriteDefine}.c2done
postgres-planner-overviewoptimizer/plan/planner.c, README1done
postgres-path-generationoptimizer/path/*1done
postgres-join-orderingoptimizer/path/{joinpath,joinrels}.c, optimizer/geqo/*2done
postgres-cost-modeloptimizer/path/costsize.c, utils/adt/selfuncs.c2done
postgres-plan-creationoptimizer/plan/{createplan,setrefs,subselect}.c2done
postgres-prep-rewritesoptimizer/prep/*3done
postgres-extended-statisticsstatistics/*, commands/analyze.c2done
postgres-executorexecutor/{execMain,execProcnode,execTuples}.c1done
postgres-expression-evalexecutor/{execExpr,execExprInterp}.c2done
postgres-scan-nodesexecutor/{nodeSeqscan,nodeIndexscan,nodeIndexonlyscan,nodeBitmapHeapscan,nodeTidscan,nodeTidrangescan}.c2done
postgres-join-nodesexecutor/{nodeNestloop,nodeHashjoin,nodeMergejoin,nodeHash}.c2done
postgres-agg-sort-nodesexecutor/{nodeAgg,nodeSort,nodeGroup,nodeWindowAgg,nodeIncrementalSort}.c2done
postgres-parallel-queryexecutor/{execParallel,nodeGather,nodeGatherMerge}.c, access/transam/README.parallel2done
postgres-portals-preparedtcop/pquery.c, commands/{prepare,portalcmds}.c, utils/cache/plancache.c2done
postgres-jitjit/*, jit/llvm/*4done
postgres-tuplesortutils/sort/{tuplesort,tuplestore}.c3done
postgres-node-treesnodes/*, include/nodes/*2done

Source roots: postmaster, tcop, storage/{lmgr,ipc,sync}, utils/init.

Doc (slug)Source anchorPStatus
postgres-postmasterpostmaster/{postmaster,launch_backend,pmchild}.c1done
postgres-backend-lifecycletcop/{postgres,utility}.c, utils/init/{postinit,miscinit}.c1done
postgres-shared-memory-ipcstorage/ipc/{shmem,ipci,procsignal,shm_mq,dsm,dsa}.c1done
postgres-lock-managerstorage/lmgr/{lock,proc,deadlock,lmgr}.c, README1done
postgres-lwlock-spinlockstorage/lmgr/{lwlock,s_lock}.c, include/storage/spin.h, port/atomics1done
postgres-ssi-predicate-lockingstorage/lmgr/predicate.c, include/storage/predicate_internals.h, README-SSI2done
postgres-latch-signalsstorage/ipc/{latch,waiteventset}.c, postmaster/interrupt.c2done
postgres-background-workerspostmaster/bgworker.c, storage/ipc/{dsm,dsa}.c3done
postgres-aux-processespostmaster/{bgwriter,walwriter,checkpointer,startup,syslogger}.c2done

Source roots: utils/activity/*.

Doc (slug)Source anchorPStatus
postgres-cumulative-statsutils/activity/pgstat*.c (shared-mem stats, PG15 redesign)2done
postgres-wait-events-progressutils/activity/{wait_event,backend_status,backend_progress}.c, wait_event_names.txt codegen3done

Source roots: catalog, utils/cache.

Doc (slug)Source anchorPStatus
postgres-system-catalogscatalog/{catalog,heap,pg_*}.c, include/catalog/*1done
postgres-relcacheutils/cache/relcache.c1done
postgres-catcache-syscacheutils/cache/{catcache,syscache,lsyscache}.c1done
postgres-cache-invalidationutils/cache/inval.c, storage/ipc/sinvaladt.c2done
postgres-dependency-trackingcatalog/{dependency,objectaddress}.c2done
postgres-namespace-search-pathcatalog/namespace.c3done

Source roots: commands, partitioning, rewrite/rowsecurity.c.

Doc (slug)Source anchorPStatus
postgres-ddl-executiontcop/utility.c, commands/{tablecmds,define}.c1done
postgres-alter-tablecommands/tablecmds.c2done
postgres-index-creationcommands/indexcmds.c, catalog/index.c2done
postgres-constraintscommands/{typecmds,constraint}.c, catalog/pg_constraint.c3done
postgres-triggerscommands/trigger.c2done
postgres-event-triggerscommands/event_trigger.c4done
postgres-partitioningpartitioning/*, catalog/partition.c, executor/execPartition.c2done
postgres-row-level-securityrewrite/rowsecurity.c, commands/policy.c3done
postgres-copycommands/{copy,copyfrom,copyto,copyfromparse}.c3done
postgres-matviewcommands/matview.c4done

Source roots: replication/*, backup, postmaster/{walsummarizer,pgarch}.

Doc (slug)Source anchorPStatus
postgres-wal-sender-receiverreplication/{walsender,walreceiver,walreceiverfuncs}.c1done
postgres-replication-slotsreplication/{slot,slotfuncs}.c2done
postgres-logical-decodingreplication/logical/{decode,reorderbuffer,snapbuild,logical}.c2done
postgres-logical-replication-applyreplication/logical/{worker,launcher,tablesync}.c3done
postgres-pgoutputreplication/pgoutput/*4done
postgres-synchronous-replicationreplication/syncrep.c3done
postgres-archiving-walsummarypostmaster/{pgarch,walsummarizer}.c, access/transam/xlogarchive.c3done
postgres-backup-basebackupbackup/*2done
postgres-incremental-backupbackup/* (summary consumer), src/bin/pg_combinebackup3done

Source roots: libpq, tcop/postgres.c. (Backend-side libpq only — see non-goals.)

Doc (slug)Source anchorPStatus
postgres-wire-protocoltcop/postgres.c (msg loop), libpq/{pqcomm,pqformat}.c1done
postgres-authenticationlibpq/{auth,auth-scram,auth-sasl,crypt}.c2done
postgres-tls-gssapilibpq/{be-secure,be-secure-gssapi,be-secure-openssl}.c3done

Source roots: foreign, commands/{extension,foreigncmds}, src/pl.

Doc (slug)Source anchorPStatus
postgres-fdwforeign/foreign.c, commands/foreigncmds.c, include/foreign/fdwapi.h (in-core mechanism only)2done
postgres-extensionscommands/extension.c2done
postgres-hooksscattered *_hook globals (planner/executor/ProcessUtility/shmem)3done
postgres-plpgsqlsrc/pl/plpgsql/src/*2done
postgres-spiexecutor/spi.c3done
postgres-custom-scaninclude/nodes/extensible.h, executor/nodeCustom.c4done

Source roots: utils/{mmgr,error,fmgr,adt,mb,misc,sort,resowner,hash}.

Doc (slug)Source anchorPStatus
postgres-memory-contextsutils/mmgr/{mcxt,aset,generation,slab,bump}.c, README1done
postgres-error-handlingutils/error/{elog,assert}.c1done
postgres-fmgrutils/fmgr/{fmgr,funcapi}.c2done
postgres-datatypes-adtutils/adt/* (numeric, varlena, datetime, jsonb, arrays, ranges)2done
postgres-guc-parametersutils/misc/{guc,guc_tables}.c2done
postgres-resource-ownersutils/resowner/resowner.c3done
postgres-dynahashutils/hash/dynahash.c, lib/*3done

Source roots: tsearch, utils/adt/pg_locale*.

Doc (slug)Source anchorPStatus
postgres-collation-providersutils/adt/{pg_locale,pg_locale_icu,pg_locale_libc,pg_locale_builtin}.c, commands/collationcmds.c3done
postgres-encodingutils/mb/*3done
postgres-full-text-searchtsearch/*, GIN integration3done

Source roots: src/bin/*, bootstrap, catalog/genbki.pl.

Doc (slug)Source anchorPStatus
postgres-initdb-bootstrap-genbkisrc/bin/initdb, bootstrap/bootstrap.c, catalog/genbki.pl + pg_*.dat.bki codegen2done
postgres-pg-dump-restoresrc/bin/pg_dump/*2done
postgres-pg-upgradesrc/bin/pg_upgrade/*3done
postgres-pg-basebackupsrc/bin/pg_basebackup/*3done
postgres-pg-rewindsrc/bin/pg_rewind/*4done
postgres-pg-waldumpsrc/bin/pg_waldump/*4done
postgres-psqlsrc/bin/psql/*3done
postgres-pg-ctl-controldatasrc/bin/{pg_ctl,pg_controldata}, control-file handling in xlog.c3done

Evolution docs (doc_type: evolution) trace a single subsystem’s architectural progression across major releases — one ## per era, a timeline Mermaid, before/after structural diffs, and cross-links to the current-state module doc(s). An evolution doc is justified only when a subsystem has ≥3 architecturally distinct eras. All are planned; each follows its subsystem’s current-state module doc(s).

Evolution doc (slug)ArcStatus
postgres-evolution-replicationWAL file shipping → streaming (9.0) → sync/cascading (9.1–9.2) → logical decoding (9.4) → pub/sub logical replication (10) → improvements (14–18, incl. failover slots)done
postgres-evolution-vacuum-visibilitylazy vacuum → HOT (8.3) → visibility map (8.4) → freeze map (9.6) → parallel vacuum (13) → autovacuum + wraparound hardeningdone
postgres-evolution-partitioninginheritance/constraint-exclusion → declarative (10) → partition-wise join/agg (11) → runtime pruning (11) → improvementsdone
postgres-evolution-parallel-queryintroduced (9.6) → parallel join/agg (10) → parallel index build (11), parallel vacuum (13), parallel-aware nodesdone
postgres-evolution-statisticsstats-collector process → extended statistics (10) → shared-memory cumulative stats (15)done
postgres-evolution-pluggable-storagefixed heap → table access method API (12) → custom AMs, columnar landscapedone
postgres-evolution-io-asyncbuffered I/O → posix_fadvise prefetch → WAL prefetch (15) → async I/O io_uring/worker (18)done

Each module doc’s “Theoretical Background” (§1) and “Beyond PostgreSQL” (§6) sections draw from four anchor sources, in priority order:

  1. In-tree README for that subsystem — PostgreSQL’s analog of CUBRID’s vendor decks, except current and accurate. These are first-class design docs and must be mined in the Theoretical/Approach sections and cited in sources:. Known READMEs (confirm per module): access/transam/README (+ README.parallel), access/nbtree/README, access/gin/README, access/gist/README, access/spgist/README, access/brin/README, access/hash/README, access/heap/README.HOT, storage/buffer/README, storage/lmgr/README + README-SSI, optimizer/README, replication/README, utils/mmgr/README.
  2. knowledge/research/dbms-papers/ — the curated primary-source tree. PG-relevant captures already present: aries.md (→ recovery-redo, xlog-wal), systemr.md + systemr-optimizer.md (→ planner, cost-model), occ.md (→ mvcc, ssi), btree.md (→ nbtree), rstar-tree.md (→ gist), scalable-lock-manager.md (→ lock-manager), goes-around.md + fntdb07-architecture.md (→ architecture-overview, design-philosophy).
  3. knowledge/research/dbms-general/database-internals.md, database-system-concepts.md (generic textbook framing); also Designing Data-Intensive Applications for replication/consistency.
  4. PG-specific papers (landed — 13 captures in dbms-papers/ + raw PDFs in raw/dbms/papers/): design-of-postgres (→ architecture-overview, design-philosophy, extensibility), implementation-of-postgres (→ storage, no-overwrite/MVCC lineage), postgres-storage-system, postgres-data-model, postgres-next-generation, ssi-ports-grittner + ssi-cahill + making-si-serializable (→ ssi-predicate-locking), berenson-isolation (→ mvcc-snapshots, ssi), gist (→ gist), lehman-yao (→ nbtree), seltzer-yigit-hash (→ hash-index), fong-optimizer (→ planner, cost-model). All 13 are present; module docs may cite them directly.

These will not get their own docs unless the constraint changes:

  • contrib/ entirely. The tree is core-only. contrib/postgres_fdw, pg_stat_statements, bloom, and every other contrib module are not analyzed. The in-core mechanisms they build on are covered: postgres-fdw.md documents the in-core FDW machinery (foreign/, fdwapi.h) and may name postgres_fdw as the canonical example only; postgres-hooks.md documents the hook globals pg_stat_statements rides on, not the extension itself.
  • PG19-only features. The version pin is REL_18_STABLE (commit 273fe94). PG19-only items must not be asserted as present — notably the XLOG2 resource manager and the online data-checksums worker BackendTypes (B_DATACHECKSUMSWORKER_*). PG18 features (async I/O, WAL summarization, incremental backup, cumulative stats) are in scope.
  • Client drivers other than backend libpq. The client-protocol subcategory covers the backend (server-side) FE/BE wire protocol, auth, and TLS/GSSAPI under src/backend/libpq/ + tcop/postgres.c. The client-side libpq library (src/interfaces/libpq), ECPG, and other language drivers (JDBC, psqlODBC, the Python/Go/Rust drivers) are out of scope.
  • Test frameworks. The regression-test harness (src/test/regress, pg_regress), TAP tests (src/test/perl, src/bin/**/t/*.pl), the isolation tester (src/test/isolation), and src/test/modules are not documented as a subject. Coverage of the engine invariants those tests exercise belongs in the corresponding subsystem doc, not in a doc about the test harness.
  • Per-symbol coverage. This map is at module granularity. We do not track which functions/structs lack prose — the per-doc position-hint tables already pin canonical symbols.
  • Build/packaging and platform glue. src/tools, config/, the meson / autoconf build, src/port / src/common are touched only where a module doc needs them (e.g. port/atomics for spinlocks); they get no standalone doc.

When a doc moves status (e.g. an author starts or finishes one):

  1. Update its Status cell in the matching subcategory table (plannedin progressdone).
  2. Bump updated: here (and in the KO mirror, per the bilingual rule).
  3. Re-run /kb-index knowledge/code-analysis/postgres to refresh README.md.

When a new module appears in the source tree that the plan’s catalog did not anticipate:

  1. Decide its subcategory (one of the thirteen above).
  2. Add a planned row naming the slug and source anchor, and record the decision in the plan’s module catalog (.omc/plans/postgres-analysis-plan.md §6) so the two stay in sync.

When a non-goal becomes a goal (e.g. a decision to analyze a specific contrib module):

  1. Move it from Non-goals into the matching subcategory table as a planned row, with a brief note on what changed.
  • README.md — per-doc catalog (auto-generated from frontmatter summary:).
  • postgres-architecture-overview.md — the seven-axis spine: process model, shared-memory/IPC substrate, the WAL durability spine, storage and pluggable access methods, query pipeline, catalog+cache layer, extensibility surface; one Mermaid per axis, forward-referencing every detail doc.
  • .omc/plans/postgres-analysis-plan.md — the operational authoring plan (axis set §4, taxonomy §5, module catalog §6, DoD §8) this map tracks.
  • knowledge/methodology/code-analysis-doc.md — the 7-section playbook the module docs are written against.
  • cubrid-coverage.md — the CUBRID coverage map this one is modelled on.