From: Arthur Zakirov <a.zakirov@postgrespro.ru>
To: Justin Pryzby <pryzby@telsasoft.com>
To: pgsql-hackers@postgresql.org
Subject: Re: query logging of prepared statements
Date: Mon, 4 Mar 2019 18:53:31 +0300
Message-ID: <70868e0d-2a29-36c8-e3e2-f54a56804bc4@postgrespro.ru> (raw)
In-Reply-To: <20190227180653.GF28750@telsasoft.com>
References: <20190208132953.GF29720@telsasoft.com>
<20190215145704.GW30291@telsasoft.com>
<20190227180653.GF28750@telsasoft.com>
Hello Justin,
On 27.02.2019 21:06, Justin Pryzby wrote:
> I'm attaching a v2 patch which avoids repeated logging of PREPARE, rather than
> making such logs conditional on log_error_verbosity=VERBOSE, since
> log_error_verbosity is documented to control whether these are output:
> DETAIL/HINT/QUERY/CONTEXT/SQLSTATE.
I looked the patch. I got interesting result with different parameters.
With log_statement='all' and log_min_duration_statement='0' I get:
=# execute test_ins(3);
LOG: statement: execute test_ins(3);
LOG: duration: 17.283 ms
But with log_statement='none' and log_min_duration_statement='0' I get:
=# execute test_ins(3);
LOG: duration: 8.439 ms statement: execute test_ins(3);
DETAIL: prepare: prepare test_ins (int) as
insert into test values ($1);
Is it intended? In the second result I got the query details.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
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: a.zakirov@postgrespro.ru, pryzby@telsasoft.com
Subject: Re: query logging of prepared statements
In-Reply-To: <70868e0d-2a29-36c8-e3e2-f54a56804bc4@postgrespro.ru>
* 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