model-writtenrun 2060 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- 蔡梦娟(玊于) reported that a crash during a checkpoint could leave a prepared transaction recoverable from both disk and WAL, causing duplicate lock recovery and startup failure, then supplied a PostgreSQL 11 fix that reused the existing transaction entry and preferred WAL data #1 #2.
- Andy Fan objected to scanning all prepared transactions for every replayed PREPARE record and proposed filtering disk state using a stored LSN; 蔡梦娟(玊于) explained why changing the state-file format would not rescue affected installations and supplied a master-branch reproducer using checkpoint delay and panic injection #3 #4.
- Michael Paquier rejected a file-format change and considered shared-state restructuring too risky for recovery, instead proposing a file-existence check that skips duplicates before consistency and rejects them afterward, with an optional assertion-only array check #5.
- 蔡梦娟(玊于) implemented that redesign, then incorporated Michael Paquier's requests to narrow variable scope and improve the duplicate-state diagnostic #6 #7 #8.
- Michael Paquier committed the final submission as cb0cca1880, backpatched through PostgreSQL 11, replacing stat() with access(), handling non-ENOENT failures, using ERROR after consistency, simplifying comments, and dropping the assertion scan because of its limited benefit and recovery cost; the standalone reproducer was not included #8 #9.
- Two years later, 蔡梦娟(玊于) reported that repeated checks for nonexistent state files could accumulate dentries and allegedly overflow a directory reference count, proposing to stop checking after consistency; Michael Paquier pointed to related work questioning disk-state restoration at recovery startup #11 #12.
- 蔡梦娟(玊于) submitted the follow-up patch, but Michael Paquier explained that it could conceal errors from incorrect base backups and that broader recovery changes might eventually eliminate the check entirely #13 #14.
- The thread ends with 蔡梦娟(玊于) accepting the base-backup objection and asking about progress on the broader recovery work; the original fix is committed, while the follow-up remains unresolved #15.