Re: BUG #17686: SELECT pg_advisory_lock(...) with low lock_timeout sometimes times out but the lock is acquired

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Adelson <mike(dot)adelson314(at)gmail(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17686: SELECT pg_advisory_lock(...) with low lock_timeout sometimes times out but the lock is acquired
Date: 2022-11-12 18:51:52
Message-ID: 146790.1668279112@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mike Adelson <mike(dot)adelson314(at)gmail(dot)com> writes:
> Glad to have the race condition confirmed. In my view the “real” fix
> here would be to offer an advisory locking function that accepts a
> timeout.

How would that remove the low-level race condition?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mike Adelson 2022-11-12 20:18:39 RE: BUG #17686: SELECT pg_advisory_lock(...) with low lock_timeout sometimes times out but the lock is acquired
Previous Message Mike Adelson 2022-11-12 18:28:45 RE: BUG #17686: SELECT pg_advisory_lock(...) with low lock_timeout sometimes times out but the lock is acquired