BUG #17140: pg_try_advisory_xact_lock produces a WARNINIG on unsuccessful lock

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: cherio(at)gmail(dot)com
Subject: BUG #17140: pg_try_advisory_xact_lock produces a WARNINIG on unsuccessful lock
Date: 2021-08-10 18:29:45
Message-ID: 17140-38f50de605441268@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17140
Logged by: Yuri Cherio
Email address: cherio(at)gmail(dot)com
PostgreSQL version: 13.3
Operating system: Ubuntu Linux 20.04
Description:

Function "pg_try_advisory_xact_lock" triggers a WARNING message when the
lock is already owned by someone else. The documentation explicitly mentions
warnings on advisory unlock functions and those are understandable - the
developer should not try to unlock what's not owned.

However the advisory lock functions are there for this specific reason -
test whether a resource is locked or not. A negative test should not produce
a WARNING.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rainer Tammer 2021-08-11 06:33:10 Re: Postgres 9.2.13 on AIX 7.1
Previous Message Kacey Holston 2021-08-10 18:28:49 Re: Issue with logical replication