Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQRDv-0003oZ-8U for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Aug 2022 10:33:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oQRDs-0005IM-8X for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Aug 2022 10:33:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQRDr-0005IC-Gb for pgsql-hackers@lists.postgresql.org; Tue, 23 Aug 2022 10:33:27 +0000 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQRDl-0006tp-Tk for pgsql-hackers@postgresql.org; Tue, 23 Aug 2022 10:33:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1661250802; x=1692786802; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=1u32Eu49BBpmspKefBeqkiEb3E8QO0vvd8E1s3QfglE=; b=MUSOtzDOY8CBvqVRSM5pXJnb2cMZ6z0vD9WhXh7EPyCT0O/cbQqrdJrR eYi/O4pjtwEgNmKBps5+e36OVcPFTVg3dOhSrg4MClDPrRz3tEnaXFq9r uWkTUCTCKznY/+gj6zVZnggt2zYyqh8Dzgdd20odVFgpVRuz5IwPUb+4V k=; X-IronPort-AV: E=Sophos;i="5.93,257,1654560000"; d="scan'208";a="251959974" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2c-a264e6fe.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2022 08:53:24 +0000 Received: from EX13D03EUC003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2c-a264e6fe.us-west-2.amazon.com (Postfix) with ESMTPS id 8EF7945122; Tue, 23 Aug 2022 08:53:22 +0000 (UTC) Received: from [192.168.3.204] (10.43.161.228) by EX13D03EUC003.ant.amazon.com (10.43.164.192) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 23 Aug 2022 08:53:18 +0000 Message-ID: Date: Tue, 23 Aug 2022 10:53:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers Content-Language: en-US To: Michael Paquier , Jacob Champion CC: Joe Conway , Robert Haas , Tom Lane , "sfrost@snowman.net" , "rjuju123@gmail.com" , "pgsql-hackers@postgresql.org" , "andres@anarazel.de" References: <2a1e2717-8c68-3f9e-1e02-32da71deb327@amazon.com> <127bd019-04f0-313c-551c-d949cdc4ad50@amazon.com> <520bd3ce-334b-b9c2-2130-858fb04ce56f@amazon.com> <2541c086-e370-d114-69a7-b48b05b25471@amazon.com> From: "Drouvot, Bertrand" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.43.161.228] X-ClientProxiedBy: EX13D41UWB003.ant.amazon.com (10.43.161.243) To EX13D03EUC003.ant.amazon.com (10.43.164.192) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 8/23/22 4:25 AM, Michael Paquier wrote: > On Mon, Aug 22, 2022 at 08:10:10AM -0700, Jacob Champion wrote: >> otherwise I'll sit tight. > So am I. I have done an extra round of checks around the > serialization/deserialization logic where I put some elog()'s to look > at the output passed down with some workers and a couple of auth > methods, and after an indentation and some comment polishing I finish > with the attached. > > There was one thing that annoyed me with the patch, though, as of the > lack of initialization of MyClientConnectionInfo at backend startup, > as we may finish by not calling set_authn() to fill in some of its > data, so I have placed an extra memset(0) in InitProcessGlobals() Fair point. > (note that Port does a calloc() much earlier than that, but I think > that we don't really want to do more in such code paths, especially > for the parallelized client information). > > I have written a commit message, while on it. Does that look fine to > you? Thanks! That sounds all good to me, except a typo for the author in the commit message: s/Jocob/Jacob/ Regards, -- Bertrand Drouvot Amazon Web Services: https://aws.amazon.com