Re: statement_timeout logging - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: statement_timeout logging
Date
Msg-id KGEFLMPJFBNNLNOOOPLGCEFICJAA.simon@2ndquadrant.com
Whole thread Raw
In response to Re: statement_timeout logging  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: statement_timeout logging
List pgsql-hackers
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> I don't see why printing the query cancel from a timeout is any more
> special than a user request for cancel or a simple query error.  If
> users want statements to be printed on error, they will
> configure things
> that way, if not, we should not print them.

The log is for admins, not users.

If an admin sets statement_timeout, then it is a good idea to have the
SQL logged as a way of gaining performance information  for the *admin*,
who knows less about what users do, yet is still charged with the need
to tune if one user is effecting other users/jobs. That's a different
scenario than a user cancelling their query. The user knows they've
cancelled it, so they already know the SQL and can ask the admin if they
want it faster.  Generally the admin doesn't care if a user cancelled a
query, since it might be for a whole host of reasons, whereas a query
cancelled for statement_timeout has one specific cause.

So, I still want this functionality, so the "bad" query is in the logs.

Best Regards, Simon Riggs



pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Why does VACUUM FULL bother locking pages?
Next
From: "Simon Riggs"
Date:
Subject: Re: [DOCS] statement_timeout logging