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 1nNHiV-0004XT-Vl for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Feb 2022 17:15:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nNHiU-0003Jd-TI for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Feb 2022 17:15:46 +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 1nNHiU-0003Gn-Jx for pgsql-hackers@lists.postgresql.org; Thu, 24 Feb 2022 17:15:46 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nNHiS-0002dn-OL for pgsql-hackers@postgresql.org; Thu, 24 Feb 2022 17:15:46 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 132so2283256pga.5 for ; Thu, 24 Feb 2022 09:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Epd7u79ncpcm6vF4CYeaLTEXWPcJKK3ZoY+jAxhoj5s=; b=aO+jCEcX5fQjyECH9nCJF3+trB30aGShfdUMiAwel+OL/xitxH+b5rud/hoQr069Lp rU1zo6GxLcLvkF60jKUXhYy4gn69QvFgAGlGJdLiLiQB+4BtbeWFT0W2QreZS8+7HZ0h 2wK/i5hSyYS/jyAWPlkEId3GSm1pdzsX0iQP2Bu8ET0kzKpZwxmKa1CMEqush4kw9tIr xcJWUA9ZZYI0mKbCraQrT94BasBRuVc33jgr40Qai/5AGkMJv5pyj2x0PEGG+iqGvB4l 6qy/MAGTtQ9UjumxJYQiKNCQCptm/EKyxYnutEhLhyEgIxHlCFa6WwsTY1/jgcfu3CwJ XAjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Epd7u79ncpcm6vF4CYeaLTEXWPcJKK3ZoY+jAxhoj5s=; b=aVIuII7aVfMjwZSrOt/n5xOOwfX0vi5gX1laMGe1DAml/hIFGuBCtCn7dZqHdyDCXM LpY+vyOg3af4FSZ0AffNaTamYRr1eVJd+MkC0E9v/kpYPrPlkvHei8/CiZpF+96m36gP xEVv5xc+e/Pk+TLk1Gl1eK+b+tAqxeG8DbKCqoGft6eXw2b355w3sO+TGsBdgUmVJzfj qPqexn1U2cK++xcGn+12m1EBuj92td+B3ww8wykv3nSj0pFbBTkIkn1Kcls3izpg9fsB aZF28+m/EVy+FEvODQ+RgTi/VLEW0WVqD44DZUsH21b5gXLyvkAAE6nNKEI80usZ1+7I Yc2w== X-Gm-Message-State: AOAM532tcQVLZRvQrQBx1PhUgRW6QTd3cX3Cup/vkadiMpUfWB+it0gw maktO2NTrVdZF0/m+DodJW0= X-Google-Smtp-Source: ABdhPJwZ/FGQa2Nk6JDYhZ9gpPT70C9VgOdhxhAITv2ivI2BKscTrAZQHAEhA3wYnDBRvTqMuHdqhw== X-Received: by 2002:a65:4687:0:b0:373:a276:767 with SMTP id h7-20020a654687000000b00373a2760767mr3017692pgr.409.1645722942958; Thu, 24 Feb 2022 09:15:42 -0800 (PST) Received: from jrouhaud (2001-b011-1005-9344-0593-a7fb-cae3-7a89.dynamic-ip6.hinet.net. [2001:b011:1005:9344:593:a7fb:cae3:7a89]) by smtp.gmail.com with ESMTPSA id h7-20020a056a00218700b004e0314bc83csm40482pfi.139.2022.02.24.09.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 09:15:42 -0800 (PST) Date: Fri, 25 Feb 2022 01:15:38 +0800 From: Julien Rouhaud To: Jacob Champion Cc: "michael@paquier.xyz" , "pgsql-hackers@postgresql.org" , "sfrost@snowman.net" Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers Message-ID: <20220224171538.jbf2cxzmhiwuinp4@jrouhaud> References: <793d990837ae5c06a558d58d62de9378ab525d83.camel@vmware.com> <2e28b12b450f247d5c0994207030c862263e0297.camel@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2e28b12b450f247d5c0994207030c862263e0297.camel@vmware.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Feb 24, 2022 at 04:50:59PM +0000, Jacob Champion wrote: > On Thu, 2022-02-24 at 20:39 +0900, Michael Paquier wrote: > > I don't quite see the additional value that this API brings as > > MyProcPort is directly accessible, and contrib modules like > > postgres_fdw and sslinfo just use that to find the data of the current > > backend. > > Right -- I just didn't know if third-party modules were actually able > to rely on the internal layout of struct Port. Is that guaranteed to > remain constant for a major release line? If so, this new API is > superfluous. Yes, third-party can rely on Port layout. We don't break ABI between minor release. In some occasions we can add additional fields at the end of a struct, but nothing more. > > I could still see a use case for that at a more global level with > > beentrys, but it looked like there was not much interest the last time > > I dropped this idea. > > I agree that this would be useful to have in the stats. From my outside > perspective, it seems like it's difficult to get strings of arbitrary > length in there; is that accurate? Yes, as it's all in shared memory. The only workaround is using something like track_activity_query_size, but it's not great.