From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mariel Cherkassky <mariel.cherkassky@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: query that canceled isnt logged
Date: Sun, 08 Dec 2019 10:05:02 -0500
Message-ID: <28518.1575817502@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+t6e1nYocLRyELmm6VM81JjfwTz_QbkiSJgyUkyDHGd-DFt8A@mail.gmail.com>
References: <CA+t6e1nYocLRyELmm6VM81JjfwTz_QbkiSJgyUkyDHGd-DFt8A@mail.gmail.com>
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> ...
> Therefore, my theory was that the validation query is taking more than 2
> seconds. I decided to log all the statements(log_statements=all) that are
> running in order to see for how long the validation query is running in the
> db (log_min_duration_statement wont be helpful here because the query is
> canceled and I wont be able to see its duration..).
> The weird thing is that I dont see before that error any log message that
> indicate that the query was running. I hoped to see the following msg in
> the db log :
> 2019-12-08 00:04:55 IST DB 2695 LOG: *execute *<unnamed>: select 1 as test
> but I dont see any execute msg of this query , I just see the ERROR msg :
> 2019-12-08 00:04:56 IST DB 10035 ERROR: canceling statement due to user
> request
> 2019-12-08 00:04:56 IST DB 10035 STATEMENT: select 1 as test
Hm. Perhaps you should *also* turn on log_min_duration_statement = 0,
so that the parse and bind phases log something. Maybe one of them
is taking a long time (hard to see why...)
regards, tom lane
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, mariel.cherkassky@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: query that canceled isnt logged
In-Reply-To: <28518.1575817502@sss.pgh.pa.us>
* 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