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 1oL0Ek-0003LM-TI for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Aug 2022 10:43:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oL0Eg-0004V2-Hf for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Aug 2022 10:43:50 +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 1oL0Ef-0004Un-LA for pgsql-hackers@lists.postgresql.org; Mon, 08 Aug 2022 10:43:50 +0000 Received: from smtp-fw-80007.amazon.com ([99.78.197.218]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oL0Ec-0004bN-QV for pgsql-hackers@postgresql.org; Mon, 08 Aug 2022 10:43:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1659955427; x=1691491427; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=JxOBYRKsCCYIMk32ZQcGBHH0wnRWqUw+kQAU9DD9ipY=; b=pKB9zIYRh/FzQZzSI4hhTF4FUNomqnZjXcYESahfyb+vjjWSuPORDixN PWs95Xkt73AZdDfCn7ijG3RpJ1+G11paD8K1byuLA3pFFY0B47TEv+wea s8uSxz7ubj71MyCViMWwf5d8Mz5JW5WL+9j3frJDwgom7453xIGApea3M g=; X-IronPort-AV: E=Sophos;i="5.93,222,1654560000"; d="scan'208";a="116812751" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1a-2d7489a4.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2022 10:43:26 +0000 Received: from EX13D03EUC003.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1a-2d7489a4.us-east-1.amazon.com (Postfix) with ESMTPS id DB3549C6E6; Mon, 8 Aug 2022 10:43:23 +0000 (UTC) Received: from [192.168.0.101] (10.43.162.134) by EX13D03EUC003.ant.amazon.com (10.43.164.192) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Mon, 8 Aug 2022 10:43:19 +0000 Message-ID: Date: Mon, 8 Aug 2022 12:43: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.0 Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers To: Michael Paquier , Joe Conway CC: Jacob Champion , Robert Haas , Tom Lane , "sfrost@snowman.net" , "rjuju123@gmail.com" , "pgsql-hackers@postgresql.org" , "andres@anarazel.de" References: <3b678314-054a-6119-b373-4574067f404e@timescale.com> Content-Language: en-US From: "Drouvot, Bertrand" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.43.162.134] X-ClientProxiedBy: EX13D03UWC004.ant.amazon.com (10.43.162.49) 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/7/22 9:41 AM, Michael Paquier wrote: > Anyway, I was looking at Bertrand's patch, and I can see that it is > doing nothing to move away the connection information that we have in > Port away to a different structure passed down to the parallel > workers, Thanks for looking at it! That's right. The main reason is that in the v2-0003 SYSTEM_USER patch what is passed down to the parallel workers is not Port->authn_id but a new "SystemUser" (defined in miscinit.c with CurrentUserId and friends). > which is what I understand is a cleanup worth on its own > based on the discussion of this thread. Hence, I still see a good > argument for the introduction of ClientConnectionInfo that gets passed > down to the workers. I agree that it could it be useful too. > Based on that, I think that we'd better finish > v11-0002 (only ClientConnectionInfo, no SQL interface) I agree. > as a first step > to build for the next ones, with authn being the first piece of > information given to the workers. With a separate structure, the > auth_method can also be a second member in ClientConnectionInfo, > completing what would be needed to build SYSTEM_USER as the workers > would have access to it. but I'm not sure we should do it as a first step (given the fact that this is not Port->authn_id that is passed down to the parallel workers in the SYSTEM_USER patch). What do you think about working on both (aka a) v11-002 only ClientConnectionInfo and b) SYSTEM_USER) in parallel? Thanks -- Bertrand Drouvot Amazon Web Services: https://aws.amazon.com