potential stuck lock in SaveSlotToPath()
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-03-18T15:46:23Z
Lists: pgsql-hackers
Attachments
- 0001-Drop-slot-s-LWLock-before-returning-from-SaveSlotToP.patch (text/plain) patch 0001
When SaveSlotToPath() is called with elevel=LOG, the early exits don't release the slot's io_in_progress_lock. Fix attached. This could result in a walsender being stuck on the lock forever. A possible way to get into this situation is if the offending code paths are triggered in a low disk space situation. (This is how it was found; maybe there are other ways.) Pavan Deolasee and Craig Ringer worked on this issue. I'm forwarding it on their behalf. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Drop slot's LWLock before returning from SaveSlotToPath()
- ce28a43ffa89 9.5.22 landed
- 2d8597ba66a1 9.6.18 landed
- f36a10434a31 10.13 landed
- ba4cc05ce22d 11.8 landed
- 223e9c77dcaf 12.3 landed
- 49bf81536e24 13.0 landed