Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3fnl-0052ff-UX for pgsql-docs@arkaria.postgresql.org; Thu, 16 Nov 2023 17:05:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r3fnh-007nyd-VW for pgsql-docs@arkaria.postgresql.org; Thu, 16 Nov 2023 17:05:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3fnh-007nyU-NR for pgsql-docs@lists.postgresql.org; Thu, 16 Nov 2023 17:05:09 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3fne-006llj-CU for pgsql-docs@lists.postgresql.org; Thu, 16 Nov 2023 17:05:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3AGH52Dc405271; Thu, 16 Nov 2023 12:05:02 -0500 From: Tom Lane To: Daniel Rinehart cc: Laurenz Albe , pgsql-docs@lists.postgresql.org Subject: Re: Additional Notes In-reply-to: References: <170006991214.398197.16221983243746809180@wrigleys.postgresql.org> <2e0ffcb3a67e0ece4dd4de34d33541b12f4e78b7.camel@cybertec.at> Comments: In-reply-to Daniel Rinehart message dated "Thu, 16 Nov 2023 09:35:15 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <405269.1700154302.1@sss.pgh.pa.us> Date: Thu, 16 Nov 2023 12:05:02 -0500 Message-ID: <405270.1700154302@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Rinehart 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