Re: Adding some error context for lock wait failures
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Zhang Mingli <zmlpostgres@gmail.com>, pgsql-hackers@lists.postgresql.org,
Steve Baldwin <steve.baldwin@gmail.com>
Date: 2025-08-29T19:46:33Z
Lists: pgsql-hackers
Dilip Kumar <dilipbalaut@gmail.com> writes: > On Fri, Jul 11, 2025 at 9:34 AM Zhang Mingli <zmlpostgres@gmail.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
Commits
-
Clean up memory leakage that occurs in context callback functions.
- 89d57c1fb355 19 (unreleased) landed
-
Provide error context when an error is thrown within WaitOnLock().
- f727b63e8107 19 (unreleased) landed