pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Alexey Bashtanov <bashtanov@imap.cc>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: log bind parameter values on error
Date: Thu, 7 Nov 2019 19:02:28 -0300
Message-ID: <20191107220228.GA8765@alvherre.pgsql> (raw)
In-Reply-To: <4e374af0-5a2b-73fa-3dfe-d180fcd2ee3e@imap.cc>

So, if some parameters are large (they can be up to 1 GB-1, remember)
then we can bloat the log file severely.  I think we need to place an
upper limit on the strings that we're going to log -- as inspiration,
callers of ExecBuildValueDescription uses 64 chars per value maximum.
Something like that seems reasonable.  So I think you need to add some
pg_mbcliplen() calls in a couple of places in exec_bind_message.

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





view thread (70+ messages)  latest in thread

Message-ID: <20191107220228.GA8765@alvherre.pgsql>
Permalink:  ../20191107220228.GA8765@alvherre.pgsql/
Also on:    postgresql.org/message-id/20191107220228.GA8765@alvherre.pgsql

 · 

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: alvherre@2ndquadrant.com, bashtanov@imap.cc, andres@anarazel.de, peter.eisentraut@2ndquadrant.com
  Subject: Re: log bind parameter values on error
  In-Reply-To: <20191107220228.GA8765@alvherre.pgsql>

* 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