Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDocf-0006WH-Sq for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Aug 2021 13:50:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mDoce-0004pf-SE for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Aug 2021 13:50:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDoce-0004pX-LY for pgsql-bugs@lists.postgresql.org; Wed, 11 Aug 2021 13:50:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDocc-0006pR-LD for pgsql-bugs@lists.postgresql.org; Wed, 11 Aug 2021 13:50:20 +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 17BDoGJW3968801; Wed, 11 Aug 2021 09:50:16 -0400 From: Tom Lane To: cherio@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17140: pg_try_advisory_xact_lock produces a WARNINIG on unsuccessful lock In-reply-to: <17140-38f50de605441268@postgresql.org> References: <17140-38f50de605441268@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 10 Aug 2021 18:29:45 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3968799.1628689816.1@sss.pgh.pa.us> Date: Wed, 11 Aug 2021 09:50:16 -0400 Message-ID: <3968800.1628689816@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > Function "pg_try_advisory_xact_lock" triggers a WARNING message when the > lock is already owned by someone else. I failed to duplicate this behavior. I did this in session A: regression=# begin; BEGIN regression=*# select pg_try_advisory_xact_lock(1); pg_try_advisory_xact_lock --------------------------- t (1 row) then this in session B: regression=# select pg_try_advisory_xact_lock(1); pg_try_advisory_xact_lock --------------------------- f (1 row) No warning... regards, tom lane