Re: query logging of prepared statements

From: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: query logging of prepared statements
Date: 2019-03-04 15:53:31
Message-ID: 70868e0d-2a29-36c8-e3e2-f54a56804bc4@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nicola Contu 2019-03-04 16:01:09 Re: Performance comparison between Pgsql 10.5 and Pgsql 11.2
Previous Message Tom Lane 2019-03-04 14:22:28 Re: Performance comparison between Pgsql 10.5 and Pgsql 11.2

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper Pedersen 2019-03-04 16:20:48 Re: speeding up planning with partitions
Previous Message Magnus Hagander 2019-03-04 15:53:25 Re: Online verification of checksums