Re: adding wait_start column to pg_locks - Mailing list pgsql-hackers

From Robert Haas
Subject Re: adding wait_start column to pg_locks
Date
Msg-id CA+TgmoYowQhMhT74AsxDib6e3LFPGvXVxVOUdP0-hMNY9c1wgw@mail.gmail.com
Whole thread Raw
In response to Re: adding wait_start column to pg_locks  (Ian Lawrence Barwick <barwick@gmail.com>)
Responses Re: adding wait_start column to pg_locks  (Ian Lawrence Barwick <barwick@gmail.com>)
List pgsql-hackers
On Wed, Jan 13, 2021 at 10:40 PM Ian Lawrence Barwick <barwick@gmail.com> wrote:
> It looks like the logical place to store the value is in the PROCLOCK
> structure; ...

That seems surprising, because there's one PROCLOCK for every
combination of a process and a lock. But, a process can't be waiting
for more than one lock at the same time, because once it starts
waiting to acquire the first one, it can't do anything else, and thus
can't begin waiting for a second one. So I would have thought that
this would be recorded in the PROC.

But I haven't looked at the patch so maybe I'm dumb.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: vacuum_cost_page_miss default value and modern hardware
Next
From: Zhihong Yu
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take 2