Re: log bind parameter values on error - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: log bind parameter values on error
Date
Msg-id 20191205171945.GA28489@alvherre.pgsql
Whole thread Raw
In response to Re: log bind parameter values on error  (Alexey Bashtanov <bashtanov@imap.cc>)
Responses Re: log bind parameter values on error  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
I made a number of changes on the proposed patch and ended up with the
attached.  (I have not included the business to limit number of
characters, yet).

What this does is set an error callback, which adds the parameter values
in the DETAIL line.  This is at odds with all existing error callbacks:
they only add stuff to the CONTEXT string.  The implication is that
if an error site has a direct errdetail_log() and is run under this
error stack, that site's detail is going to be lost and replaced by the
"params" one.  Currently there aren't many errdetail_log() lines, so it
doesn't seem like a terrible problem.  However, it's something to keep
in mind.

This is not final form; there are a couple of XXX comments, and a number
of other small infelicities still to fix.  But the overall idea should
be final.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Using multiple extended statistics for estimates
Next
From: Tomas Vondra
Date:
Subject: Re: Using multiple extended statistics for estimates