>
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > This all looks good. Another thing we really need it to be able to
> > cancel queries. This would be a big win, and looks like it could fit
> > into the scheme here.
>
> I thought about proposing a PQcancelAsync that would cancel the active
> query-in-progress. But that would require support on the backend side,
> and I am far from competent to make it happen. (libpq is simple enough
> that I'm not afraid to rewrite it, but making major mods to the backend
> is another story. I just got here this week...)
In backend/libpq/pqcomm.c, I see pg_sendoob() which sends out-of-band
data FROM the backend TO the client, but it is not called from anywhere.
This could be a method of signaling that a notification was pending, and
sending out-of-band data FROm the client TO the backend could be used
for cancelling a query.
out-of-band data causes a convenient signal to the process on the other
end, which can easily be used to handle these cases.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)