model-writtenrun 7933 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Gustavsson Mikael reported that the notification queue kept filling despite no long-running transactions and only cleared after a server restart, then clarified that the problem followed an upgrade from PostgreSQL 11.9 to 11.10 #1 #6.
- Tom Lane diagnosed a race that could leave QUEUE_TAIL matching no listener, preventing further queue cleanup on older branches; he considered restoring atomic updates, reverting the earlier change, recomputing the tail, or adding another cleanup trigger, while rejecting a larger backpatch as unsuitable #7.
- Tom identified a second race in which a new listener could read pages undergoing truncation and posted a patch separating the logical tail, advanced before truncation, from the physical tail, advanced afterward #8.
- Noah Misch reviewed the required ordering of stopping reads, deleting files, and allowing new writes, checked other SLRUs for similar problems, and proposed QUEUE_STOP_PAGE to distinguish the physical limit from the logical tail #9; after discussing alternatives, he explained its consistency with existing stop-limit names #10 #11.
- Tom committed the patch as 9c83b54a9c with Noah's naming suggestion and a correction retaining logical-tail queue-usage measurement, because measuring against the physical tail caused repeated isolation-test failures; the fix was backpatched to all supported branches #12.
- Tom offered the affected deployment the options of applying the fix, temporarily reverting to 11.9, or restarting before the queue filled, and Mikael said his team would decide which option to take without reporting patch-test results #12 #13.
- Piotr Włodarczyk later reported similar queue growth after upgrading to PostgreSQL 12.5, and Tom confirmed both that this release was affected and that 12.6 would contain the already-committed fix; no further patch remained under review in the thread #14 #15 #16 #17.