pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Rinehart <danielr@neophi.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Additional Notes
Date: Thu, 16 Nov 2023 12:05:02 -0500
Message-ID: <405270.1700154302@sss.pgh.pa.us> (raw)
In-Reply-To: <CAETDeSDrybe3Fs-nhfbEv1U=ERBx6p=PSWEP0w1d32c_dYc5hg@mail.gmail.com>
References: <170006991214.398197.16221983243746809180@wrigleys.postgresql.org>
	<2e0ffcb3a67e0ece4dd4de34d33541b12f4e78b7.camel@cybertec.at>
	<CAETDeSDrybe3Fs-nhfbEv1U=ERBx6p=PSWEP0w1d32c_dYc5hg@mail.gmail.com>

Daniel Rinehart <danielr@neophi.com> writes:
> Our callout use of NOTIFY within a TRIGGER may be tangential to the root
> cause. What we wanted to call out is that neither the NOTIFY page or the
> https://www.postgresql.org/docs/16/explicit-locking.html page mention that
> NOTIFY uses an AccessExclusiveLock.

Like Laurenz, I don't see this as being tremendously important.
The lock does not conflict with any user-acquirable lock, and
since it's not a lock on a relation it doesn't wind up getting
propagated to standby servers.  We only use it as a handy way
to serialize commit of transactions that are writing the NOTIFY
queue.  If it were a lesser but still exclusive lock type,
it wouldn't make any difference.

explicit-locking.html is really only about locks on tables.
Maybe that should be clarified somewhere?

			regards, tom lane





view thread (4+ messages)

Message-ID: <405270.1700154302@sss.pgh.pa.us>
Permalink:  ../405270.1700154302@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/405270.1700154302@sss.pgh.pa.us

 · 

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-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, danielr@neophi.com, laurenz.albe@cybertec.at, pgsql-docs@lists.postgresql.org
  Subject: Re: Additional Notes
  In-Reply-To: <405270.1700154302@sss.pgh.pa.us>

* 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