Re: We're leaking predicate locks in HEAD

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: We're leaking predicate locks in HEAD
Date: 2019-05-09 08:43:06
Message-ID: CA+hUKGJ3MatVj-DEn7hwyxFtgZU0YdswheRU1poHUEB16id9_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 8, 2019 at 4:50 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Wed, May 8, 2019 at 3:53 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > > Reproduced here. Once the system reaches a state where it's leaking
> > > (which happens only occasionally for me during installcheck-parallel),
> > > it keeps leaking for future SSI transactions. The cause is
> > > SxactGlobalXmin getting stuck. The attached fixes it for me. I can't
> > > remember why on earth I made that change, but it is quite clearly
> > > wrong: you have to check every transaction, or you might never advance
> > > SxactGlobalXmin.

I pushed a version of that, thereby reverting the already-analysed
hunk, and also another similar hunk (probably harmless).

The second hunk dates from a time in development when I was treating
the final clean-up at commit time as a regular commit, but that failed
in PreCommit_CheckForSerializationFailure() because the DOOMED flag
was set by the earlier RO_SAFE partial release. The change was no
longer necessary, because final release of a partially released
read-only transaction is now done with isCommit forced to false.
(Before bb16aba50, it was done directly at RO_SAFE release time with
isCommit set to false, but bb16aba50 split the operation into two
phases, partial and then final, due to the extended object lifetime
requirement when sharing the SERIALIZABLEXACT with parallel workers.)

I'll update the open items page.

--
Thomas Munro
https://enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-05-09 08:49:12 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)
Previous Message Peter Eisentraut 2019-05-09 07:30:50 Re: Fuzzy thinking in is_publishable_class