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 1raXYG-00AE0w-56 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Feb 2024 08:57:04 +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 1raXYE-00BiDr-DL for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Feb 2024 08:57:02 +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 1raXYE-00BiDi-3g for pgsql-hackers@lists.postgresql.org; Thu, 15 Feb 2024 08:57:02 +0000 Received: from m16.mail.163.com ([220.197.31.2]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1raXY7-007Igt-QT for pgsql-hackers@lists.postgresql.org; Thu, 15 Feb 2024 08:57:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=iQWwx+izIymnRV5Ll38dQdJr79X4VwV2hITME4V3wO0=; b=k5abetWCDsYh7AfxIPDwwFQUv6y8rVMDwni0xdVmyHAmbwXJJypHZX5sRWy6JU mj2v6TkqzHeAZlhwstXUlYfOluSulyvF46+H6l8hiQs4JTDKBCVZWDw13a+1/iuF 67AIGSjksUMN32/nIShSGeTtfet2etA8yZzJusph/IJlw= Received: from 8235eee8a2a0 (unknown [140.205.118.110]) by gzga-smtp-mta-g1-2 (Coremail) with SMTP id _____wDXD1mZ0c1l4NqGCQ--.4861S3; Thu, 15 Feb 2024 16:55:54 +0800 (CST) References: <127bd019-04f0-313c-551c-d949cdc4ad50@amazon.com> <520bd3ce-334b-b9c2-2130-858fb04ce56f@amazon.com> <2541c086-e370-d114-69a7-b48b05b25471@amazon.com> User-agent: mu4e 1.10.7; emacs 29.1 From: Andy Fan To: Michael Paquier Cc: Jacob Champion , "Drouvot, Bertrand" , Joe Conway , Robert Haas , Tom Lane , "sfrost@snowman.net" , "rjuju123@gmail.com" , "pgsql-hackers@postgresql.org" , "andres@anarazel.de" , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers Date: Thu, 15 Feb 2024 16:53:30 +0800 In-reply-to: Message-ID: <875xyqhzs6.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: _____wDXD1mZ0c1l4NqGCQ--.4861S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrKF1UurWfZry7KF18Cr1kGrg_yoWxuFX_u3 WUJayvyrnruan5AwsYyr43CwsxKrWkX3sFv390gr9Iga95Xrsruwn5uFnxZrWkJF42ga1r uFsxWFW5K34akjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUUDPEDUUUUU== X-Originating-IP: [140.205.118.110] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/1tbiQAWFU2VOBe0f6AACsl List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Hi, Michael Paquier writes: > [[PGP Signed Part:Undecided]] > On Tue, Aug 23, 2022 at 10:04:30AM -0700, Jacob Champion wrote: > > My main worry here is EXEC_BACKEND, where we would just use our own > implementation of fork(), and it is a bad idea at the end to leave > that untouched while we could have code paths that attempt to access > it. At the end, I have moved the initialization at the same place as > where we set MyProcPort for a backend in BackendInitialize(), mainly > as a matter of consistency because ClientConnectionInfo is aimed at > being a subset of that. And applied. I found a compiler complaint of this patch. The attached fix that. -- Best Regards Andy Fan --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v1-0001-Remove-the-parameter-maxsize-set-but-not-used-err.patch From 9e8a3fb7a044704fbfcd682a897f72260266bd54 Mon Sep 17 00:00:00 2001 From: "yizhi.fzh" Date: Thu, 15 Feb 2024 16:46:57 +0800 Subject: [PATCH v1 1/1] Remove the "parameter 'maxsize' set but not used" error. maxsize is only used in Assert build, to make compiler quiet, it is better maintaining it only assert build. --- src/backend/utils/init/miscinit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 23f77a59e5..0e72fcefab 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -1050,7 +1050,9 @@ SerializeClientConnectionInfo(Size maxsize, char *start_address) Assert(maxsize >= sizeof(serialized)); memcpy(start_address, &serialized, sizeof(serialized)); +#ifdef USE_ASSERT_CHECKING maxsize -= sizeof(serialized); +#endif start_address += sizeof(serialized); /* Copy authn_id into the space after the struct */ -- 2.34.1 --=-=-=--