model-writtenrun 7707 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Apr - Jul 2020 · 10 entries
- Mark Dilger opened the thread with heapcheck, a proposed extension for detecting invalid transaction IDs, TOAST pointers, and structural heap corruption that page checksums can miss #1.
- Peter Geoghegan advocated integrating the checker into amcheck and providing a DBA-facing interface, while Andres Freund's detailed review challenged iterator helpers, memory-only error accumulation, visibility checks, locking, and test portability #2 #4 #8.
- Mark moved the implementation into amcheck as verify_heapam, adopted a materialized SRF and cached transaction bounds, and subsequently added all-visible/all-frozen page skipping #15 #16.
- Robert Haas preferred a command-line tool and block-range controls over a dedicated periodic background worker, and Mark responded with pg_amcheck plus a proposed btree interface returning corruption rows #17 #19 #21.
- Peter warned that continuing btree traversal after corruption could loop or violate crash-avoidance assumptions, establishing a limit on the proposed btree changes and on how much backend hardening belonged in this project #22 #24 #31.
- The testing discussion distinguished reproducible corruption cases from random fuzzing, with Robert defending positive corruption tests, Álvaro Herrera clarifying his objection to random blocks, and Tom Lane supporting deterministic tests #35 #37 #38.
- After a June rebase, Dilip Kumar's hint-bit review produced a small test delta and then actual incompatibility checks and assertions, while cross-checking hint bits against CLOG remained constrained by locking costs #41 #42 #43 #45 #48.
- Erik Rijkers's testing corrected CLI connection defaults, and Dilip's subsequent reviews improved redirected-line-pointer validation, tuple-header alignment, TOAST diagnostics, and cleanup across the next revisions #46 #47 #49 #57.
- Álvaro and Robert requested separately reviewable components, leading Mark to split btree checking, heap checking, and the CLI into three patches and apply Amul Sul's naming, formatting, and cleanup feedback #53 #58 #60 #63 #65.
- Concurrency review explored stronger relation locks, advertised transaction horizons, and CLOG truncation protection; Robert rejected a cluster-wide pruning penalty, and the next substantial revision used AccessShareLock with revised transaction-range handling #77 #91 #98.
Aug - Sep 2020 · 3 entries
- Peter's renewed objection to continuing after btree corruption persuaded Robert and Mark to drop the btree interface rewrite, leaving heap verification and the CLI as the active components #82 #87 #98.
- Amul's review drove argument and schema corrections, while Peter later identified that raw xmax can represent a multixact and Tom objected to exposing cstring through SQL; Mark corrected these alongside transaction-status refactoring and Windows integration #100 #101 #115 #117 #120.
- A truncated-CLOG recovery case raised by Andrey Borodin led Mark to add a nonthrowing CLOG/SLRU interface and its amcheck consumer, while disagreement about access restrictions caused additional ACL checks to be separated into their own patch #102 #121 #124.
Oct 2020 - Feb 2021 · 17 entries
- Robert prepared a heap-only version for commit, but linking exposed unsupported translation calls; Álvaro and Tom reviewed the problem, and Mark incorporated Robert's edits and removed those calls in the final five-patch submission #126 #127 #129 #132.
- The heap component of that submission landed essentially unchanged as 866e24d47d, leaving the CLI, nonthrowing CLOG interface, and extra ACL checks uncommitted #132 #133.
- Buildfarm failures exposed an uninitialized fxid path, and the first fix from Mark's corrective pair landed with semicolon cleanup as 8bb0c9770e #137 #139.
- The accompanying test investigation found that a single-quoted Perl string wrote literal backslashes rather than the intended corruption bytes, and endian-dependent line-pointer interpretation made the existing test unreliable #149 #161.
- Mark supplied corrected WIP tests using selected line-pointer patterns and matching diagnostics, which Tom tested on big-endian hardware and committed with formatting changes as 860593ec3b #165 #166 #167.
- A subsequent SIGBUS report revealed missing checks before dereferencing corrupt tuple pointers, prompting Mark's alignment and bounds patch; Tom rearranged safety checks and tuned both-endian test patterns before committing 321633e17b #169 #171 #173.
- Mark resent the uncommitted CLI, CLOG, and ACL components while acknowledging unsettled consensus about them #178 #181.
- Tom's objection to overwide sample output led to 4c49d8fc15, which also corrected the documented verify_heapam signature and reorganized general usage guidance #182.
- Robert's November CLI review challenged conservative defaults, duplicated pg_dump logic, excessive queries, and missing parallelism; Peter explained expensive btree-check tradeoffs, while Robert favored exposing existing checks with useful defaults #184 #185 #186.
- Mark argued that backend performance requirements limited safe corruption probing and that the nonthrowing CLOG changes were unlikely to land; these and the extra ACL proposal disappeared from the active January series without a supplied commit #188 #191.
- The January redesign factored pg_dump helpers into fe_utils in a nine-patch series, revised CLI defaults, and then incorporated Thomas Munro's Windows header and linkage fixes #191 #192 #194 #195.
- Robert rejected unnecessary globals, abstraction layers, and remaining pg_dump coupling, so Mark replaced the object-selection approach with local pattern queries and reusable ParallelSlots for parallel multi-database checks #196 #197.
- Further review removed unused exit infrastructure and simplified result callbacks, while the series gained optional PostgresNode helpers for testing restored or partially overwritten relation files #198 #203 #204.
- The patternToSQLRegex extraction from the latest full submission landed unchanged as 2c8726c4b0, and Mark resent the remaining components #205 #207.
- The frontend-helper relocation from that remainder landed with light edits as e955bd4b6c, while its result-handler component landed with boolean callbacks and local cleanup as 418611c84d #207 #209.
- The remaining CLI revision improved query construction and search-path safety, and Robert persuaded Mark to stop on query-send failures or FATAL/PANIC errors while continuing ordinary SQL errors and returning a nonzero result for detected problems #210 #211 #213.
- Mark then added multi-database slot reuse, simplified automatic TOAST/index expansion options, revised progress reporting, and shortened the documentation #215.
Mar 2021 · 3 entries
- Robert proposed encapsulating slots in ParallelSlotArray and opening connections lazily; Mark implemented that design with connection adoption and shared connection parameters in the last patchset here #216 #218.
- The final messages still review slot allocation, CLI options, diagnostics, SQL, and tests, and Robert requests a new thread and CommitFest entry because the remaining work no longer fits the heapcheck subject #219 #220.
- The eventual multi-database slot and CLI commits, f71519e545 and 9706092839, belong to newer submissions in thread #43793; the optional PostgresNode corruption-test extension remains unlanded in the supplied material.