Re: Add “FOR UPDATE NOWAIT” lock details to the log.

From: Yuki Seino <seinoyu(at)oss(dot)nttdata(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add “FOR UPDATE NOWAIT” lock details to the log.
Date: 2025-02-28 12:08:01
Message-ID: 52d9125a-07da-4228-bc46-aa7234dabca2@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2025/02/27 15:44, Yuki Seino wrote:
> (4)
> https://github.com/postgres/postgres/blob/master/src/backend/access/heap/heapam_handler.c#L463
>
> ...I don't know how to reproduce it.
I have confirmed that (4) can be reproduced using the following procedure.

(4)
https://github.com/postgres/postgres/blob/master/src/backend/access/heap/heapam_handler.c#L463
tx1=# SELECT pg_advisory_lock(0);
tx2=# SELECT * FROM pgbench_accounts WHERE pg_advisory_lock(0) IS NOT
NULL FOR UPDATE NOWAIT;
tx1=# UPDATE pgbench_accounts SET aid = aid WHERE aid = '1';
tx1=# BEGIN;
tx1=# UPDATE pgbench_accounts SET aid = aid WHERE aid = '1';
tx1=# SELECT pg_advisory_unlock(0);

Send the modified patch.

Regard,

Attachment Content-Type Size
v7-0001_add_log_lock_failure.patch text/plain 26.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2025-02-28 12:11:29 Re: Improve CRC32C performance on SSE4.2
Previous Message Fujii Masao 2025-02-28 12:02:43 Re: Extend postgres_fdw_get_connections to return remote backend pid