On Mon, Feb 24, 2014 at 10:13 AM, Christian Kruse <christ...@2ndquadrant.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers