Re: query logging of prepared statements - Mailing list pgsql-hackers

From Arthur Zakirov
Subject Re: query logging of prepared statements
Date
Msg-id 70868e0d-2a29-36c8-e3e2-f54a56804bc4@postgrespro.ru
Whole thread Raw
In response to Re: query logging of prepared statements  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: query logging of prepared statements
List 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


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Online verification of checksums
Next
From: Jesper Pedersen
Date:
Subject: Re: speeding up planning with partitions