Re: BUG #17122: panic on prepare with subsequent pg_advisory_lock() and pg_advisory_xact_lock_shared()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: a(dot)pyhalov(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17122: panic on prepare with subsequent pg_advisory_lock() and pg_advisory_xact_lock_shared()
Date: 2021-07-26 03:31:32
Message-ID: YP4slEQhxQnKNbMB@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Jul 24, 2021 at 05:44:57PM -0400, Tom Lane wrote:
> The reason why not is that the code that's meant to detect that is
> just fundamentally inadequate. It's examining individual LOCALLOCK
> entries to detect conflicts, but we keep separate LOCALLOCK entries
> for different lockmodes on the same object. So pg_advisory_lock()
> creates an entry with lockmode ExclusiveLock, while
> pg_advisory_xact_lock_shared() creates a different entry with lockmode
> AccessShareLock. But they are pointing at the same PROCLOCK, and the
> restriction we're dealing with here applies at the PROCLOCK level.

For the archives: this has been applied as of 6310809.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2021-07-26 07:36:01 Re: BUG #17116: Assert failed in SerialSetActiveSerXmin() on commit of parallelized serializable transaction
Previous Message Pawel Kudzia 2021-07-25 20:47:43 Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows