Re: Provide PID data for "cannot wait on a latch owned by another process" in latch.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Provide PID data for "cannot wait on a latch owned by another process" in latch.c
Date: 2023-02-28 08:53:22
Message-ID: Y/3BAiqpIx6nNhHQ@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2023-02-28 09:49:13 Re: Track IO times in pg_stat_io
Previous Message Bharath Rupireddy 2023-02-28 08:52:03 Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode