From: Justin Pryzby <pryzby@telsasoft.com>
To: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org
Subject: Re: query logging of prepared statements
Date: Sun, 7 Apr 2019 10:31:01 -0500
Message-ID: <20190407153101.GA10080@telsasoft.com> (raw)
In-Reply-To: <20190406011638.pgb7uxjz2hnhavsu@alap3.anarazel.de>
References: <20190404182630.GA4305@alvherre.pgsql>
<20190404190126.GA6155@alvherre.pgsql>
<20190406011638.pgb7uxjz2hnhavsu@alap3.anarazel.de>
Hi,
Thanks both for thinking about this.
On Fri, Apr 05, 2019 at 06:16:38PM -0700, Andres Freund wrote:
> On 2019-04-04 16:01:26 -0300, Alvaro Herrera wrote:
> > Also, if you parse once and bind/execute many times, IMO the statement
> > should be logged exactly once. I think you could that with the flag I
> > propose.
> I think deduplicating the logging between bind and execute has less of
> that hazard.
Do you mean the bind parameters, which are only duplicated in the case of
log_min_duration_statement ?
I actually implemented that, using Alvaro's suggestion of a flag in the Portal,
and decided that if duration is exceeded, for bind or execute, then it's likely
desirable to log the params, even if it's duplicitive. Since I've been using
log_statement=all, and not log_min_duration_statement, I don't have a strong
opinion about it.
Perhaps you're right (and perhaps I should switch to
log_min_duration_statement). I'll tentately plan to withdraw the patch.
Thanks,
Justin
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: pryzby@telsasoft.com, andres@anarazel.de, alvherre@2ndquadrant.com, a.zakirov@postgrespro.ru
Subject: Re: query logging of prepared statements
In-Reply-To: <20190407153101.GA10080@telsasoft.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