On Fri, Dec 1, 2017 at 1:28 PM, Robert Haas <robertmh...@gmail.com> wrote: > [ lots of minor comments ]
When I took a break from sitting at the computer, I realized that I think this has a more serious problem: won't it permanently leak reference counts if someone hits ^C or an error occurs while the lock is held? I think it will -- it probably needs to do cleanup at the places where we do LWLockReleaseAll() that includes decrementing the shared refcount if necessary, rather than doing cleanup at the places we release heavyweight locks. I might be wrong about the details here -- this is off the top of my head. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company