Re: "ERROR: latch already owned" on gharial - Mailing list pgsql-hackers

From Tom Lane
Subject Re: "ERROR: latch already owned" on gharial
Date
Msg-id 2643515.1653661311@sss.pgh.pa.us
Whole thread Raw
In response to Re: "ERROR: latch already owned" on gharial  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: "ERROR: latch already owned" on gharial
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, May 27, 2022 at 7:55 AM Thomas Munro <thomas.munro@gmail.com> wrote:
>> Thanks.  Hmm.  So far it's always a parallel worker.  The best idea I
>> have is to include the ID of the mystery PID in the error message and
>> see if that provides a clue next time.

> ... Even if we find a bug in PostgreSQL,
> it's likely to be a bug that only matters on systems nobody cares
> about.

That's possible, certainly.  It's also possible that it's a real bug
that so far has only manifested there for (say) timing reasons.
The buildfarm is not so large that we can write off single-machine
failures as being unlikely to hit in the real world.

What I'd suggest is to promote that failure to elog(PANIC), which
would at least give us the PID and if we're lucky a stack trace.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: "ERROR: latch already owned" on gharial
Next
From: Tom Lane
Date:
Subject: Re: PG15 beta1 sort performance regression due to Generation context change