model-writtenrun 589 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby reported an intermittent PostgreSQL 19 assertion failure while adding a unique constraint during a restore, involving parallel workers and read timing without a matching read count #1.
- Andrey Rachitskiy traced the failure to waiting for another backend's IO and proposed skipping that wait's timing; he acknowledged the lost statistics and suggested a separate IOOP_WAIT operation as a possible alternative #2 #3.
- Melanie Plageman argued that foreign-IO wait time mattered and questioned a separate wait operation, while Rachitskiy opposed counting foreign waits as reads because that would inflate operation counts #4 #5.
- Andrey Borodin supplied a stable reproducer and attached Rachitskiy's timing-suppression fix, supporting its avoidance of double counting while explicitly marking the test as unsuitable for committing #6.
- Andres Freund advocated allowing time without an operation count, suggested a timing-only helper, and outlined broader unresolved problems with attributing waits for AIO resources #7.
- Rachitskiy reworked the fix to retain foreign-IO timing, introduce pgstat_count_io_time(), relax validation, and document that read time can appear without reads #8.
- Melanie retained the validation and documentation changes but omitted the new helper, explaining that it added little protection and complicated backpatching; this subset landed as c9a6694927 on master and PostgreSQL 19, resolving the assertion failure while leaving broader AIO accounting improvements for future work #9 #10.