Re: query that canceled isnt logged - Mailing list pgsql-performance

From Tom Lane
Subject Re: query that canceled isnt logged
Date
Msg-id 5943.1575819720@sss.pgh.pa.us
Whole thread Raw
In response to Re: query that canceled isnt logged  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
List pgsql-performance
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> If I'll try to run the following query and cancel it manually(ctrl+c) :
> select pg_sleep(10)
> I will see in the logs the following messages :

> 2019-12-08 17:16:34 IST postgres 30797  LOG:  statement: select
> pg_sleep(10);
> 2019-12-08 17:16:36 IST postgres 30797  ERROR:  canceling statement due to
> user request
> 2019-12-08 17:16:36 IST postgres 30797  STATEMENT:  select pg_sleep(10);

Note that that's going through "simple query" protocol (which is why
it says "statement:") but your application is evidently using "extended
query" protocol (because you see "execute ...:", at least when it's
working correctly).  I wonder whether the explanation is somewhere in
that.

The best theory I have at the moment, though, is that something is taking
exclusive locks on system catalogs, blocking parsing of even trivial
statements.

            regards, tom lane



pgsql-performance by date:

Previous
From: Mariel Cherkassky
Date:
Subject: Re: query that canceled isnt logged
Next
From: Lars Aksel Opsahl
Date:
Subject: Re: How to run in parallel in Postgres, EXECUTE_PARALLEL