model-writtenrun 6414 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Jul 2021 ยท 14 entries
- Justin Pryzby reported PostgreSQL 14 beta 1 exhausting connections because an autovacuum worker consumed a CPU while holding a pg_statistic page lock, blocking other sessions #1.
- Matthias van de Meent suspected that pruning and HeapTupleSatisfiesVacuum() disagreed about a tuple's deadness #2; Justin's debugger results confirmed the disagreement, and Matthias identified a catalog visibility horizon older than VACUUM's OldestXmin #12 #13.
- An investigation into concurrent-index status flags found no supporting evidence, so Alvaro Herrera ruled out that suspected connection #21 #23.
- Peter Geoghegan supplied a diagnostic assertion that failed on a second retry of the same heap page #26, and Justin used it to reproduce the problem on a fresh cluster with concurrent REINDEX and ANALYZE loops #30; Michael Paquier independently reproduced the infinite loop #35.
- Matthias traced the mismatch to different relation-classification conditions in GetOldestNonRemovableTransactionId() and GlobalVisTestFor(), supplied a fix with additional assertions, and reported that it prevented his reproduction #36.
- Andres Freund confirmed that RelationIsAccessibleInLogicalDecoding() fails to select the catalog horizon when wal_level is below logical and requested separating the minimal correction from broader changes #37; Peter endorsed the fix and suggested checking the tuple state before retrying #38.
- Peter explained that concurrent transaction aborts legitimately require the retry path #41, while Alvaro ruled out recently committed legacy xvac transactions as another practical trigger #47.
- Andres sought reliable test coverage before strengthening retry assertions #48 #53, while Peter described testing with an injected sleep and favored an assertion that the inserting transaction had aborted #54; no automated retry-path test was attached.
- Andres pointed out that computed horizons can legitimately move backward #57, prompting Matthias's revised patch to remove the monotonicity assertions and add a vacuumlazy.c path that skipped retrying when horizons disagreed #58.
- Peter challenged changing VACUUM's assumptions and preferred correcting horizon behavior elsewhere #59; Matthias subsequently acknowledged that his new continue path could violate the requirement to leave no dead tuples older than OldestXmin #64.
- Andres proposed keeping maybe_needed from moving backward within a backend, identifying a possible race involving hot-standby feedback #62; Matthias discussed its replication implications, and Peter accepted the underlying concern #64 #65.
- For beta 2, Andres committed only the horizon-selection correction from the latest patchset #58 as 5a1e1d8302, leaving out its assertions and VACUUM fallback, then posted an inline helper design to unify relation classification #66.
- Andres later implemented that inline design as d9d8aa9bb9, sharing GlobalVisHorizonKindForRel() between both horizon consumers and backpatching the cleanup to PostgreSQL 14; his final message confirmed it was pushed #68.
- The thread ends with the minimal bug fix and classification cleanup landed #66 #68, but without a recorded landing of the proposed backward-horizon protection or retry-path tests discussed in #62 and #48.