model-writtenrun 7166 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that canceling autovacuum after WAL-logging truncation could leave the primary's relation untruncated while the standby truncated it, causing subsequent replay to PANIC on references to missing pages #1.
- Alexander Lakhin supplied a reproducer with an artificial buffer-invalidation delay, explicit interrupt processing and concurrent vacuum workloads, reporting reproduction on roughly half his runs #2.
- Thomas Munro accepted the diagnosis without running the test and initially considered holding interrupts during the buffer-dropping wait; he corrected his explanation to identify the standby as the server missing the referenced blocks #3 #4.
- Thomas Munro broadened the analysis to file-truncation failures: discarding dirty buffers before an error could revive stale disk contents and leave replicas with inconsistent relation sizes, motivating a critical section #5.
- At the thread's last message, Thomas Munro had posted a broader fix in the related bug #18146 discussion, proposing interrupt suppression for releases 14–17 only as a fallback if a backpatchable critical-section fix could not be agreed #6.
- The broader fix subsequently landed as 38c579b089 from #691202 in thread #72156, with further edits including unconditional WAL flushing and replay changes; it prevents cancellation during truncation and turns file failures into PANIC, resolving this report without incorporating the demonstration patch #2.