Re: adding wait_start column to pg_locks

torikoshia <torikoshia@oss.nttdata.com>

From: torikoshia <torikoshia@oss.nttdata.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org
Date: 2021-01-04T06:04:29Z
Lists: pgsql-hackers

Attachments

On 2021-01-02 06:49, Justin Pryzby wrote:
> On Tue, Dec 15, 2020 at 11:47:23AM +0900, torikoshia wrote:
>> So I'm now thinking about adding a new column in pg_locks which
>> keeps the time at which locks started waiting.
>> 
>> Attached a patch.
> 
> This is failing make check-world, would you send an updated patch ?
> 
> I added you as an author so it shows up here.
> http://cfbot.cputube.org/atsushi-torikoshi.html

Thanks!

Attached an updated patch.

Regards,

Commits

  1. Initialize atomic variable waitStart in PGPROC, at postmaster startup.

  2. Display the time when the process started waiting for the lock, in pg_locks, take 2

  3. Display the time when the process started waiting for the lock, in pg_locks.