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 1u2EpK-00F6Ws-3i for pgsql-committers@arkaria.postgresql.org; Tue, 08 Apr 2025 19:41:43 +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 1u2EpI-00Ea2n-I3 for pgsql-committers@arkaria.postgresql.org; Tue, 08 Apr 2025 19:41:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2EpI-00Ea2F-7T for pgsql-committers@lists.postgresql.org; Tue, 08 Apr 2025 19:41:40 +0000 Received: from lahtoruutu.iki.fi ([2a0b:5c81:1c1::37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2EpG-004C5b-0S for pgsql-committers@lists.postgresql.org; Tue, 08 Apr 2025 19:41:40 +0000 Received: from [192.168.1.112] (iptv-hkibng21-58c090-167.dhcp.inet.fi [88.192.144.167]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4ZXGfg3wssz49Pyv; Tue, 8 Apr 2025 22:41:31 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1744141291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hDh9GhJ6VF+GT/ulcxlFAsN5aV32e14bf7X0byRMjyc=; b=WX0eWgM2PGGH1SxHUfwQQxpe+FrQSrdZE/e3b9LBaSKqCLmTTkEIA+B46qle5W0H/GccOj bqzq5Du3iGbq4OQy5HT5Wd+3eLotAJDvvfWaXw4oQomT7TJhRiIBYSV+2W+OQtXKjWALT4 2BTEZD1VQvAwRsk6EfImLfHOJiX1k5B1dLOI/gzIgRMnnEWwrcRxuhahPPXO/xQM5JgT18 /iHErWDsmUWgtPHMq/0i0pTGOfS2YPxVk0XexTmzB7vuM9Aq9RoAMrZ6AM+Rl4Ptu4ex8y H0cjz/f1NGMuunY7oixGVwPXfYw5yG/wxDaDCvjO50OcxONjLpUElCKZEL8yMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1744141291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hDh9GhJ6VF+GT/ulcxlFAsN5aV32e14bf7X0byRMjyc=; b=Xqb6gTdGBYW960YYTumkZx4PYTs+f1kqTOJgBbj7GpCGGH+RiDJRuoahbkqmMK/5/VjOYt gH7lYgABzrini3umREu03+pcKUT3QCuysIoBXGccE3TX43v02zBRpYvBtQe0RMaJ3F8szZ 73HgOpXzGtpla9mImskY+rVZrnHgQkLwlZRsPiR4pvyKJqdKTUADU4b7EkXEy1T+KNhi4u jaeWrcrgora+Gs2IwN2uFNO0T6v/8kydcJiinr2GDfX+MeHcymMpHcm/qR26Jn/U6ap3Yw gqSBErPjD+NZWFtHkDVG4Zp+lyKTJpjGU4nPwxpG2mefkEHp7D85mwgLoH+7OQ== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1744141291; a=rsa-sha256; cv=none; b=V/2AD9TnpMJMC6KN6NPr6ywBNGk3v3CdvqAACiJd4GFX5wf/lOejkgSCsIuBYti/Jv6rjK TdYZvm9SGFeIhB3FbyeTb09z9NK0zhRS1XEkPUynKy6qQhkY+bgakJNUnLQ0L6ybSGMIjS ctevjrhOIdGEUvNmbm69ijTIZ06inxm4zXWPK6sk3GKIXsm2v/CIsGYkE7TE6/vboc3nzZ UVQ0PAiux8gZMa9L5VQx0180GtWM18KBxrJYzPFD2rFi2AdAxis53BLT/m0amolgh4v7pY WJQgOCf4amM7P3ghrWvpWOs01HE5LhfQr6jt1IOJ7LJxcEIL1Oe/0infFGnpQw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi Message-ID: <09323e6a-4743-4be2-9d7f-74b86e4dac64@iki.fi> Date: Tue, 8 Apr 2025 22:41:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: Make cancel request keys longer To: Peter Eisentraut , pgsql-committers@lists.postgresql.org References: <61be9e31-7b7d-49d5-bc11-721800d89d64@eisentraut.org> Content-Language: en-US From: Heikki Linnakangas In-Reply-To: <61be9e31-7b7d-49d5-bc11-721800d89d64@eisentraut.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 08/04/2025 20:06, Peter Eisentraut wrote: > On 02.04.25 15:43, Heikki Linnakangas wrote: >> Make cancel request keys longer > > This patch changed the signature of ProcSignal() > > -ProcSignalInit(bool cancel_key_valid, int32 cancel_key) > +ProcSignalInit(char *cancel_key, int cancel_key_len) > > but did not update the caller in auxprocess.c: > > ProcSignalInit(false, 0); > > This gives a warning with clang. Good catch. I wonder why the cirrus CI didn't complain, it has a step to check for warnings with clang. > While I was looking at this, I suggest to make the first argument void > *.  This is consistent for passing binary data. Ok, sure. > Also, I wonder why MyCancelKeyLength is of type uint8 rather than > something more mundane like int.  There doesn't seem to be any API > reason for this type. Agreed. The cancel key length is documented to be at most 256 bytes, but that's more of a coincidence, nothing depends on that variable being uint8. > See attached patch for possible changes. Looks good to me. I can commit these tomorrow, or feel free to do it yourself too. Thank you! -- Heikki Linnakangas Neon (https://neon.tech)