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 1nNi4m-0005k5-6I for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 21:24:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nNi4E-0000iS-Pg for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Feb 2022 21:23:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNi4D-0000iC-4e for pgsql-hackers@lists.postgresql.org; Fri, 25 Feb 2022 21:23:58 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNi48-0006mn-S5 for pgsql-hackers@postgresql.org; Fri, 25 Feb 2022 21:23:56 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 704CC5C01B7; Fri, 25 Feb 2022 16:23:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 25 Feb 2022 16:23:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=gVAC7jVQLYsbEe3ieW8XkLRiTee/2Dry7iQzwK 1uWFY=; b=VhcE5RAvVcmbc49C7JQitWLOHHMA/4uXfx7qYwJeFp4azp9YDXVTtW 8FXzoEjdaikTji12XttUuknrdI9XBEERfXm6No5oewJrGzAZBux3ipKMIog2esNX ET41FGwgmnEIVRRf71+1YqqpXa/iLv4O6mgHWOAhtvr2tF0QuKQ202obSUtLsAts 0egKd9+K5r5UYuA7D9syaLRsVOilVWUxrmFENtM4qKVfgdlsyV1T5HRVJrd0BrDn SS/QqQ/NrDoo4QrDWpoWeC9y77iWfy+KBOvxwD/kKW4ODrhHSY2VdCkUkE6s8Q5P 00zDH3jZQPbNS4SIkV2mAm7Cxv2ECmjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=gVAC7jVQLYsbEe3ie W8XkLRiTee/2Dry7iQzwK1uWFY=; b=QxYP1i0SSLM3d2pYm+Se94HQSLboP/AGk DkU85dA6Xlz0QuogEgNw0Uf+RTwZwIfPz8FIb4N91KBNFmv1FzWBMmrhQOupMUUM EHO5HyTdsS2jlHXYSaaZDvv0waVfZWKpHy3ebWKc+8blpU0Qm9IoE2m15Hcd4DQU bwuzuaBvgwu51ofBaIDyPQUplPGgFEzy0QgQZOFuq6Gj0xkuT0bB2vf1ODCbV6M2 n/x6S1qZjNj1+KTGWr5gOgJnQ/NOxDfyfLBncZCQdJjuLpvfBcSk7r7ZlZjlZ4cG tceinI1RdFE9KETYf2+hzm2CS0HUrT9OCTiD0SVzCCdEkvgqXCmsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleeggddugeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Feb 2022 16:23:50 -0500 (EST) Date: Fri, 25 Feb 2022 13:23:49 -0800 From: Andres Freund To: Jacob Champion Cc: "rjuju123@gmail.com" , "pgsql-hackers@postgresql.org" , "michael@paquier.xyz" , "sfrost@snowman.net" Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers Message-ID: <20220225212349.gf76klktl4dmm5ah@alap3.anarazel.de> References: <793d990837ae5c06a558d58d62de9378ab525d83.camel@vmware.com> <2e28b12b450f247d5c0994207030c862263e0297.camel@vmware.com> <20220224171538.jbf2cxzmhiwuinp4@jrouhaud> 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 2022-02-25 20:19:24 +0000, Jacob Champion wrote: > From 2fde60a6bc3739f1894c8c264120e4fa0f04df64 Mon Sep 17 00:00:00 2001 > From: Jacob Champion > Date: Mon, 14 Feb 2022 08:10:53 -0800 > Subject: [PATCH v3] Add API to retrieve authn_id from SQL > The authn_id field in MyProcPort is currently only accessible to the > backend itself. Add a SQL function, session_authn_id(), to expose the > field to triggers that may want to make use of it. Looks to me like authn_id isn't synchronized to parallel workers right now. So the function will return the wrong thing when executed as part of a parallel query. I don't think we should add further functions not prefixed with pg_. Perhaps a few tests for less trivial authn_ids could be worthwhile? E.g. certificate DNs. Greetings, Andres Freund