From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Improving deadlock error messages |
Date: | 2007-04-20 06:55:37 |
Message-ID: | 19378.1177052137@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Neil Conway <neilc(at)samurai(dot)com> writes:
> I whipped up a quick patch to use names as well as OIDs for the
> identifiers in the message, but on reflection the simple approach to
> doing this is problematic: when we do syscache lookups to lookup the
> identifier names, we might need to acquire an AccessShareLock on various
> system catalogs (pg_class, pg_namespace, pg_database). This could fail
> (e.g. because of a deadlock involving a system catalog), causing the
> deadlock detector to infinitely recurse (albeit slowly).
Yup, that's exactly why it doesn't do that already.
> We could fix this by first conditionally acquiring AccessShareLocks on
> the necessary system catalogs.
I don't think you've thought of quite all of the failure cases. One
that's a bit pressing is that a deadlock isn't necessarily confined to
objects in your own database.
My take on this is that I'd much rather have unfriendly information
than none at all.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Marcin Waldowski | 2007-04-20 07:20:05 | Re: BUG #3242: FATAL: could not unlock semaphore: error code 298 |
Previous Message | Neil Conway | 2007-04-20 06:35:49 | Improving deadlock error messages |