Help understanding SIReadLock growing without bound on completed transaction

2020-05-21 Thread Mike Klaas
We recently experienced an issue where a transaction that was finished and no longer existed kept slowly accumulating SIReadLocks over the period of a week.  The only way we could remove the locks was by restarting postgresql. The entries in pg_locks resembled: mode: SIReadLock locktype: page

Re: Help understanding SIReadLock growing without bound on completed transaction

2020-05-21 Thread Mike Klaas
On Thu, May 21, 2020 at 5:19 PM, Thomas Munro < thomas.mu...@gmail.com > wrote: > > > > On Fri, May 22, 2020 at 7:48 AM Mike Klaas < mike@ superhuman. com ( > m...@superhuman.com ) > wrote: > > > >> >> >> pid:2263461 >> >

Re: Help understanding SIReadLock growing without bound on completed transaction

2020-05-26 Thread Mike Klaas
On Fri, May 22, 2020 at 3:15 PM, Thomas Munro < thomas.mu...@gmail.com > wrote: > > > > Predicate locks are released by ClearOldPredicateLocks(), which releases > SERIALIZABLEXACTs once they are no longer interesting. It has a > conservative idea of what is no longer interesting: it waits until

Re: Help understanding SIReadLock growing without bound on completed transaction

2020-05-26 Thread Mike Klaas
21410 |   4286372911   | 117427283 |   4227767038   |  9454 |   4250653210 … select max(backend_xid::text), min(backend_xmin::text) from pg_stat_activity where state='active'; max | min --+-- 50350294 | 50350065 -Mike On Tue, May 26, 2