Re: Adding some error context for lock wait failures

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Zhang Mingli <zmlpostgres(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>
Subject: Re: Adding some error context for lock wait failures
Date: 2025-08-29 19:46:33
Message-ID: 2463552.1756496793@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dilip Kumar <dilipbalaut(at)gmail(dot)com> writes:
> On Fri, Jul 11, 2025 at 9:34 AM Zhang Mingli <zmlpostgres(at)gmail(dot)com> wrote:
>> May be confused if there were tables with same names under different schemas.

> If that's the only issue we can print schema qualified name, but I
> think the problem is in error callback we just have lock tag
> information which only have OIDs and we don't look up the
> relcaches/sys table from the error path.

Yeah. In an ideal world we'd look up the OID references and print
the object names. But trying to do catalog lookups in an
already-failed transaction seems way too dangerous, just as we've
judged it to be for deadlock reports.

Hearing no comments beyond that one, pushed.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2025-08-29 20:01:18 Re: Assert single row returning SQL-standard functions
Previous Message Merlin Moncure 2025-08-29 19:12:50 Re: Assert single row returning SQL-standard functions