> 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