Re: Proposed change to make cancellations safe

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shay Rojansky <roji(at)roji(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposed change to make cancellations safe
Date: 2016-04-25 16:34:25
Message-ID: 6530.1461602065@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shay Rojansky <roji(at)roji(dot)org> writes:
>> Issuing bulk cancellations sounds like a bad plan.

> I'm not sure why, but at the very least it's a useful thing to have when
> batching several statements together and then wanting to cancel them all.

We really do need "cancel up to" semantics for reliable behavior.
Consider the case where the client has sent the query (or thinks it has)
but the server hasn't received it yet. If the cancel request can arrive
at the server before the query fully arrives, and we don't have "cancel
all messages up through N" semantics, the cancel will not do what the
client expects it to.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-04-25 16:38:36 Re: [BUGS] Breakage with VACUUM ANALYSE + partitions
Previous Message Shay Rojansky 2016-04-25 16:16:08 Re: Proposed change to make cancellations safe