Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhfpb-00CleG-3K for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 01:12:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rhfpZ-0048wj-El for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 01:12:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhfpZ-0048qs-5P for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 01:12:25 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhfpV-0033Tf-LN for pgsql-hackers@postgresql.org; Wed, 06 Mar 2024 01:12:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=31ioHGjTQS4MePTw8EKYyDdogBQum6gPfmnfUBsFA0M=; b=E7961 o/yTJznYOBBaQAYvIjRGLUOD5ydj1yh1EtixT711Iaw0hq4LKHQSvdDgFJJvxzxBkcrhxMNZJyOC2 rhrqtrrq90/PvtUA1rxvavuyvhR7wPvaRoBacMVSzCavKrrZVRtgbkNDpfzjfqiWj3wB2g6hP6bxY ZWy37429TeiI3CUWz9xV3iMV1Y4m8nhKxZGXQBl26/ZfQCpXv5a5X1hK45hbA47XwcJuavkAgFmUp c3DqPZbkvYR4ASVEmBOiujAkKaxpU0BgkbuON4Qicsj4nsbqbkmgxNjqI9wzfYKN9uZBpYOGyV8FT aOV4+kMEq4Mb/iyPxygOcp2uxr9/w==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1rhfpS-001Pzn-3B; Tue, 05 Mar 2024 20:12:18 -0500 Date: Tue, 5 Mar 2024 20:12:18 -0500 From: Bruce Momjian To: Peter Eisentraut Cc: Heikki Linnakangas , pgsql-hackers Subject: Re: Make query cancellation keys longer Message-ID: References: <508d0505-8b7a-4864-a681-e7e5edfe32aa@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 1, 2024 at 03:19:23PM +0100, Peter Eisentraut wrote: > On 29.02.24 22:25, Heikki Linnakangas wrote: > > Currently, cancel request key is a 32-bit token, which isn't very much > > entropy. If you want to cancel another session's query, you can > > brute-force it. In most environments, an unauthorized cancellation of a > > query isn't very serious, but it nevertheless would be nice to have more > > protection from it. The attached patch makes it longer. It is an > > optional protocol feature, so it's fully backwards-compatible with > > clients that don't support longer keys. > > My intuition would be to make this a protocol version bump, not an optional > feature. I think this is something that everyone should eventually be > using, not a niche feature that you explicitly want to opt-in for. Agreed. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.