Re: Adding some error context for lock wait failures - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Adding some error context for lock wait failures
Date
Msg-id CAFiTN-vf2NTA=yaRdEBh1LZfxwRBYN1mDCBWAMckMzzq-W+DZw@mail.gmail.com
Whole thread Raw
In response to Re: Adding some error context for lock wait failures  (Zhang Mingli <zmlpostgres@gmail.com>)
List pgsql-hackers
On Fri, Jul 11, 2025 at 9:34 AM Zhang Mingli <zmlpostgres@gmail.com> wrote:
>
> On Jul 11, 2025 at 11:36 +0800, Dilip Kumar <dilipbalaut@gmail.com>, wrote:
>
>
> This seems to be quite useful to me, initially I thought if we can
> print the relation and database name then this could be even better
> but it might be a bad idea to fetch the object name while we are in
> error callback.
>
> 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.

--
Regards,
Dilip Kumar
Google



pgsql-hackers by date:

Previous
From: Zhang Mingli
Date:
Subject: Re: Adding some error context for lock wait failures
Next
From: jian he
Date:
Subject: Re: SQL:2023 JSON simplified accessor support