BUG #18332: The conditional lock cannot be granted even if the process holds a stronger lock

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: wangghge(at)gmail(dot)com
Subject: BUG #18332: The conditional lock cannot be granted even if the process holds a stronger lock
Date: 2024-02-05 09:54:01
Message-ID: 18332-68ca0b212eba488b@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: 18332
Logged by: Winter Surname
Email address: wangghge(at)gmail(dot)com
PostgreSQL version: 15.0
Operating system: Centos
Description:

Even if the process holds a stronger lock, the conditional lock request will
still return false if another process is waiting
for the same lock.

See the scenario:

process A
process B

hold AccessExclusiveLock of lock1;


request ShareLock of lock1;

ConditionalLockXXX ShareLock of lock1 <--- this returns false

But actually, process A is able to get the the ShareLock of lock1, is this a
FEATURE or BUG?

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-02-05 10:30:33 BUG #18333: Postgres is crashing if we have special character in the query
Previous Message PG Bug reporting form 2024-02-05 07:28:53 BUG #18331: Why is the session lock (DEFAULT_LOCKMETHOD) not automatically released during process exit?