From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Christian Kruse <christian(at)2ndquadrant(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: show relation and tuple infos of a lock to acquire |
Date: | 2014-02-25 21:11:46 |
Message-ID: | CA+TgmoZevwkCqoNNOA65hKbfjJwoH_g81Gie=ZrU1LoXzkST+Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 24, 2014 at 10:13 AM, Christian Kruse
<christian(at)2ndquadrant(dot)com> wrote:
> To be honest, I don't like the idea of setting up this error context
> only for log_lock_wait messages. This sounds unnecessary complex to me
> and I think that in the few cases where this message doesn't add a
> value (and thus is useless) don't justify such complexity.
Reading this over, I'm not sure I understand why this is a CONTEXT at
all and not just a DETAIL for the particular error message that it's
supposed to be decorating. Generally CONTEXT should be used for
information that will be relevant to all errors in a given code path,
and DETAIL for extra information specific to a particular error.
If we're going to stick with CONTEXT, we could rephrase it like this:
CONTEXT: while attempting to lock tuple (1,2) in relation with OID 3456
or when the relation name is known:
CONTEXT: while attempting to lock tuple (1,2) in relation "public"."foo"
>> Displaying whole tuple doesn't seem to be the most right way
>> to get debug information and especially in this case we are
>> already displaying tuple offset(ctid) which is unique identity
>> to identify a tuple. It seems to me that it is sufficient to display
>> unique value of tuple if present.
>> I understand that there is no clear issue here, so may be if others also
>> share their opinion then it will be quite easy to take a call.
I wouldn't be inclined to dump the whole tuple under any
circumstances. That could be a lot more data than what you want
dumped in your log. The PK could already be somewhat unreasonably
large, but the whole tuple could be a lot more unreasonably large.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2014-02-25 21:14:42 | Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder |
Previous Message | Peter Eisentraut | 2014-02-25 21:11:27 | Re: install libpq.dll in bin directory on Windows / Cygwin |