model-writtenrun 5272 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Jul 2021 · 3 entries
- Dilip Kumar proposed removing forced checkpoints from CREATE DATABASE and ALTER DATABASE SET TABLESPACE by WAL-logging copied pages, scanning the source database's pg_class through low-level interfaces, and consulting its relation map, crediting Robert Haas for the design #1.
- Julien Rouhaud and Andrew Dunstan warned that large-template copying was an important use case, while Heikki Linnakangas questioned the extra catalog-scanning machinery and suggested filesystem traversal; these discussions established the need to consider retaining the original copying method #2 #3 #6.
- Andres Freund pressed for correct buffer and locking behavior, while Robert defended pg_class as the authoritative list of relations; Dilip subsequently changed destination writes to use shared buffers and split the implementation into prerequisites and the main feature #11 #12 #19 #24 #25.
Sep - Oct 2021 · 2 entries
- Robert's review exposed missing relation locks, incorrect mapped-relation assumptions, and unsafe operation ordering, leading to a six-component series with explicit locking, mapped-relation lookup, tablespace-specific buffer dropping, and WAL-before-filesystem changes #26 #38.
- Dilip supplied a directory-scanning alternative but noted that filesystem names did not provide relation OIDs needed for locking; the alternative was later dropped while the pg_class implementation continued #40 #44.
Nov - Dec 2021 · 4 entries
- John Naylor and Greg Nancarrow reviewed cleanup, testing, version-file handling, and buffer release, with their corrections incorporated into the next revisions #41 #43 #44.
- Greg's tablespace-move testing exposed stale fsync requests that could crash the checkpointer, so Dilip extended ForgetDatabaseSyncRequests to identify a database within a particular tablespace #46 #48.
- Neha Sharma's tests exposed attempts to recreate relations already in nondefault tablespaces, and Ashutosh Sharma supplied a fix-up patch; Dilip folded the correction into the full series using matching source and destination database OIDs rather than an additional flag #58 #61 #66.
- Cancellation testing exposed further buffer, sync-request, and pending-unlink problems, and after a development gap Dilip and Robert agreed to defer WAL-logged ALTER DATABASE moves rather than block CREATE DATABASE on that cleanup work #63 #71 #76 #82 #90.
Feb - Apr 2022 · 16 entries
- The interface discussion settled on an enum-valued STRATEGY option proposed by Alvaro Herrera, with WAL_LOG as the default and FILE_COPY preserving the old behavior; benchmarks showed the new approach's benefit for small templates under write load and its cost for large templates #105 #111 #499174 #120 #121.
- Dilip restored the original copying path and removed the ALTER DATABASE changes, although that attachment still implemented the earlier boolean option; the following revision supplied the actual STRATEGY interface #124 #134.
- Andres challenged cross-database snapshot safety, and Robert required a latest snapshot after excluding source-database connections; Dilip incorporated that rule and split pg_class tuple processing into smaller helpers #126 #128 #131 #134.
- Robert questioned the relmap abstraction and generic copying indirection, prompting Dilip to restructure the prerequisites and move copying helpers into bufmgr.c; Robert then supplied a cleaner relmap design separating file I/O from global state #135 #138 #141.
- Dilip incorporated Robert's relmap implementation, restored ForceSyncCommit(), and added createdb strategy support and tests, then addressed temporary relations, naming, completion, and distinct WAL records for the two strategies #145 #154 #160.
- Ashutosh reviewed the relmap changes and caught redundant path handling; Robert's corrected standalone patch was bundled unchanged into the full series, and its first component landed as 39f0c4bd67 #163 #164 #165 #166.
- Dilip supplied incremental destination-locking fixes while Robert consolidated and edited the remaining feature; Robert's initial combined remainder excluded those deltas, which Dilip incorporated in the following version #174 #175 #176 #181.
- Discussion about smgr invalidation led to fake relcache entries, while duplicate abort cleanup prompted successive experiments with direct smgrcreate(), RelationPreserveStorage(), and finally an explicit register_delete argument to RelationCreateStorage() #180 #181 #184 #189 #193.
- Robert polished comments and documented the new wait event, producing the attachment that ultimately landed #194.
- Two subsequent revisions adapted missing-directory WAL replay to an unrelated recovery change, but that dependency was reverted; Robert explicitly returned to the earlier attachment and committed it unchanged as 9c08aea6a3 #198 #199 #202.
- Andres immediately reported Windows failures caused by placing createdb options after positional arguments, and Robert corrected the tests directly from the discussion in 3d067c53b2 #203 #204.
- Dilip removed a redundant alternative from the invalid-strategy error regex, and that attachment landed unchanged as c6863b8582 #213.
- Andres measured slower, larger initdb output under WAL_LOG, prompting Dilip to select FILE_COPY during initialization; Robert polished that component, Andres approved it, and it landed as ad43a413c4, whose subject incorrectly says WAL_COPY #211 #217 #221 #222.
- The accompanying replication and tablespace tests continued separately after the initdb change, adding row verification and a shared helper following Andres's criticism of weak checks, but this thread contains no confirmation that the test remainder landed #219 #224.
- Andres's Coverity report prompted a separate patch freeing database-path allocations in creation and replay; the supplied thread does not show a landing for that attachment #225 #226.
- The final message confirms completion of bulk extension: the feature and the three August fixes have landed, while WAL-logged tablespace moves were deferred and the supplied discussion leaves the expanded tests, path-memory cleanup, and interrupted-DROP DATABASE redesign without confirmed completion #82 #224 #226 #271 #280.
Aug 2022 · 8 entries
- In August, Justin Pryzby reported failures during repeated database creation and deletion, and Valgrind exposed a dangling smgr owner pointing into a freed fake relcache entry #227 #230.
- Andres identified the ownership problem, and Dilip replaced fake relcache entries with repeated smgropen() calls, then added explicit closure; Justin confirmed the freed-memory problem was fixed while reproducing a separate corruption problem #231 #234 #235 #238.
- Andres and Dilip traced the remaining corruption to interrupted DROP DATABASE discarding buffers or files before completing its catalog changes; proposals to hold interrupts or introduce an invalid-database state remained unresolved in this thread #241 #243 #244 #250 #271.
- Tom Lane independently found that skipping empty source pages shifted subsequent destination blocks and that source buffers lacked locks, while Andres proposed replacing repeated P_NEW extension with bulk extension #255 #256 #261.
- Dilip split the August work into corruption/locking, ownership, and bulk-extension patches; Tom urgently committed the first component before beta3 as 692df425b6, with only whitespace and buffer-release-order edits #270 #272.
- Tom also observed that existing tests could create corrupt copies without detecting them and objected to retaining large numbers of transient smgr entries, leading Dilip to restore explicit closure in the remaining ownership patch #272 #273 #276.
- Robert committed the ownership component unchanged from the two-patch remainder as 76733b399c and backpatched it to PostgreSQL 15, leaving bulk extension outstanding #276 #278.
- After Robert requested PGAlignedBlock for the temporary zero buffer, Dilip resubmitted the bulk-extension remainder, which landed unchanged as 3e63e8462f and was also backpatched to PostgreSQL 15 #278 #279 #280.