Re: query that canceled isnt logged

From: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
To: "MichaelDBA(at)sqlexec(dot)com" <michaeldba(at)sqlexec(dot)com>, PostgreSQL mailing lists <pgsql-performance(at)postgresql(dot)org>
Subject: Re: query that canceled isnt logged
Date: 2019-12-08 15:18:37
Message-ID: CA+t6e1k+hP1tAVn=9u0-TxufrVZKEo2E2wBJ6X5BoCo1yKvm+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

What do you mean by live queries ?
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);

The first message indicates that I run this query (logged because I set
log_statements to all) and the two next messages appear because I canceled
the query.
When it happens to my application I dont see the first message that
indicates that I run it and thats what I'm trying to understand.

>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mariel Cherkassky 2019-12-08 15:23:01 Re: query that canceled isnt logged
Previous Message Tom Lane 2019-12-08 15:05:02 Re: query that canceled isnt logged