Re: Replay attack of query cancel - Mailing list pgsql-hackers

From Stephen R. van den Berg
Subject Re: Replay attack of query cancel
Date
Msg-id 20080813101457.GF12628@cuci.nl
Whole thread Raw
In response to Re: Replay attack of query cancel  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
>[ thinks for a bit... ]  You could make it a change in the cancel
>protocol, which is to some extent independent of the main FE/BE
>protocol.  The problem is: how can the client know whether it's okay to
>use this new protocol for cancel?

Two options:
a. Send two cancelkeys in rapid succession at session startup, whereas  the first one is 0 or something.  The client
candetect the first  "special" cancelkey and then knows that the connection supports  cancelmethod 2.
 
b. At sessionstartup, advertise a new runtimeparameter:  cancelmethod=plainkey,hmaccoded  which the client can then
chosefrom.
 

I'd prefer b over a.
-- 
Sincerely,          Stephen R. van den Berg.

"And now for something *completely* different!"


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: SeqScan costs
Next
From: Gregory Stark
Date:
Subject: Re: Replay attack of query cancel