Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Postgres 8.1 logging slow queries twice

$
0
0

For every slow query logged, there is another STATEMENT follows it in my log file.

2016-03-22 11:11:23 KST [9998]: [1-1] LOG:  duration: 4796.936 ms  statement: 
    SELECT 1 FROM DUAL
2016-03-22 11:11:23 KST [9998]: [2-1] STATEMENT: 
    SELECT 1 FROM DUAL

like this. (and I sent that query just once)

How can I get only one query statement for one slow query?

postgres db=# SHOW log_statement;
 log_statement 
---------------
 none
(1 row)

postgres db=# SHOW log_min_duration_statement;
 log_min_duration_statement 
----------------------------
 2000
(1 row)

Viewing all articles
Browse latest Browse all 1138

Trending Articles