model-writtenrun 3245 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Anthonin Bonnefoy reported that pgstats DSA references increased with each backend creation without being released at shutdown, eventually overflowing and preventing new connections, and supplied a patch to release the DSA explicitly in pgstat_detach_shmem() #1.
- Michael Paquier endorsed keeping the release alongside the existing detach calls in the pgstats shutdown callback instead of registering a separate callback, and promised to fix and backpatch the issue #2.
- Anthonin confirmed that the failure had occurred on a PostgreSQL 15.5 replica after 134 days of uptime, with frequent parallel worker creation contributing to the reference-count growth #3.
- Michael committed the patch from #1 with only comment, whitespace, and commit-message edits as 7467939ea2.
- Michael closed the thread by confirming that the fix had been applied and backpatched through PostgreSQL 15, leaving no outstanding work discussed in the thread #4.