pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Alexey Bashtanov <bashtanov@imap.cc>
Cc: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: log bind parameter values on error
Date: Thu, 14 Mar 2019 13:38:53 +0100
Message-ID: <b88e8929-1eaf-67d6-2b33-76e462624d12@2ndquadrant.com> (raw )
In-Reply-To: <baf340fb-baac-832a-a5e0-a82babb07c60@imap.cc >
References: <0146a67b-a22a-0519-9082-bc29756b93a2@imap.cc >
<c4891f99-8385-5c31-1aac-e226356ec964@2ndquadrant.com >
<ad08f6a3-e38c-f851-a5a2-0bf68d1d7f72@imap.cc >
<896ac2ed-7735-1f24-d877-3249b38bb6fe@2ndquadrant.com >
<8efd95fe-3886-61f0-0faa-6c661cd2f874@imap.cc >
<084a044f-9d77-b931-0658-5d871df8a2f8@imap.cc >
<96007f6e-1e42-e454-9db4-e7842e137508@2ndquadrant.com >
<ce9cd06a-ebb4-7978-ef2e-52a4d94d4fc4@imap.cc >
<20190214202842.nyx4khxsd43z4xxh@alap3.anarazel.de >
<baf340fb-baac-832a-a5e0-a82babb07c60@imap.cc >
On 2019-02-15 15:02, Alexey Bashtanov wrote:
> Hello Anders and Peter,
>
> Thanks for your messages.
> Please see the new patch version attached.
In my testing, I couldn't get this patch to do anything. Could you
please share your testing steps?
I did
postgres -D data --log-parameters-on-error=on
pgbench -i bench
alter table pgbench_accounts alter column aid type smallint;
pgbench -M extended -S -T 10 bench
This will then error out on type overflows, but I don't see any
parameters being logged:
ERROR: value "62812" is out of range for type smallint
STATEMENT: SELECT abalance FROM pgbench_accounts WHERE aid = $1;
(In this case the error message contains the parameter value, so it's
not a very practical case, but it should work, it seems.)
Meanwhile, I have committed a patch that refactors the ParamListInfo
initialization a bit, so you don't have to initialize hasTextValues in a
bunch of places unrelated to your core code. So please rebase your
patch on that.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
view thread (70+ messages) latest in thread
Message-ID: <b88e8929-1eaf-67d6-2b33-76e462624d12@2ndquadrant.com>
Permalink: ../b88e8929-1eaf-67d6-2b33-76e462624d12@2ndquadrant.com/
Also on: postgresql.org/message-id/b88e8929-1eaf-67d6-2b33-76e462624d12@2ndquadrant.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, bashtanov@imap.cc, andres@anarazel.de
Subject: Re: log bind parameter values on error
In-Reply-To: <b88e8929-1eaf-67d6-2b33-76e462624d12@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox