Bruce Momjian escribió:
> Alvaro Herrera wrote:
> Ah, OK. Right now we have these two cancel messages:
>
> if (cancel_from_timeout)
> ereport(ERROR,
> (errcode(ERRCODE_QUERY_CANCELED),
> errmsg("canceling statement due to statement timeout")));
> else
> ereport(ERROR,
> (errcode(ERRCODE_QUERY_CANCELED),
> errmsg("canceling statement due to user request")));
>
> While the first one is fine, the second one is used for Control-C and
> the new autovacuum code to exit an activity when it is blocking someone
> from getting a table lock. Perhaps we just need to change the wording
> to "canceling statement" and not specify the cause.
We can distinguish the cases -- there's no need to mix them in a single
message. See the patch I attached somewhere else in this thread.
--
Alvaro Herrera http://www.advogato.org/person/alvherre
"No hay hombre que no aspire a la plenitud, es decir,
la suma de experiencias de que un hombre es capaz"