Re: Provide PID data for "cannot wait on a latch owned by another process" in latch.c - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Provide PID data for "cannot wait on a latch owned by another process" in latch.c
Date
Msg-id Y/3BAiqpIx6nNhHQ@paquier.xyz
Whole thread Raw
In response to Re: Provide PID data for "cannot wait on a latch owned by another process" in latch.c  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
On Tue, Feb 28, 2023 at 08:18:16AM +0100, Peter Eisentraut wrote:
> I would also have asked for some kind of prefix that introduces the numbers.

Okay.

> I wonder what these numbers are useful for though?  Is this a development
> aid?

Yes.

> Can you do anything with these numbers?

Yes.  They immediately pointed out that I missed to mark a latch as
owned in a process, hence the owner_pid was showing up as 0 when
trying to use it.  The second showed me the process that was involved,
which was still useful once cross-checked with the contents of the
logs prefixed with %p.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
Next
From: "Drouvot, Bertrand"
Date:
Subject: Re: Track IO times in pg_stat_io