pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: a.pyhalov@postgrespro.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17122: panic on prepare with subsequent pg_advisory_lock() and pg_advisory_xact_lock_shared()
Date: Mon, 26 Jul 2021 12:31:32 +0900
Message-ID: <YP4slEQhxQnKNbMB@paquier.xyz> (raw)
In-Reply-To: <1267153.1627163097@sss.pgh.pa.us>
References: <17122-04f3c32098a62233@postgresql.org>
	<924498.1627056766@sss.pgh.pa.us>
	<1267153.1627163097@sss.pgh.pa.us>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (7+ messages)

Message-ID: <YP4slEQhxQnKNbMB@paquier.xyz>
Permalink:  ../YP4slEQhxQnKNbMB@paquier.xyz/
Also on:    postgresql.org/message-id/YP4slEQhxQnKNbMB@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, a.pyhalov@postgrespro.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17122: panic on prepare with subsequent pg_advisory_lock() and pg_advisory_xact_lock_shared()
  In-Reply-To: <YP4slEQhxQnKNbMB@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox