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 1qePwU-006k2k-As for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Sep 2023 01:05:51 +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 1qePwT-005hP5-0w for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Sep 2023 01:05:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qePwR-005hOO-ID for pgsql-hackers@lists.postgresql.org; Fri, 08 Sep 2023 01:05:48 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qePwN-003LQJ-V5 for pgsql-hackers@lists.postgresql.org; Fri, 08 Sep 2023 01:05:46 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 19A205C01D2; Thu, 7 Sep 2023 21:05:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 07 Sep 2023 21:05:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type: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=fm1; t=1694135143; x=1694221543; bh=Yt ep4XS+zz5E3IyxGtziqRadCqcgVt8eallLtWjjDuU=; b=EYOvdSGisjMHknNJkM NU3tVy/TTN0IEL+tZ3oOjnJOb0M5VXOH0zKGISe3J5sz8bta4L/GoolrB3USdUUO MH6ogj9bo04nX0SiPNuXnhOdXNgWpxct9Rvae74MO5BYh92+Y1LXtKfH06nRBSMt QuxytDbfiimwdu3m2t6r8WAnaJc+bUQH/aomyqGtS1gUV+lgbkOw9AW+ewTCYkNV IRXesKd4Id5UOhZWc2H+RYJE+hVF0p4OiZMrrdVH4LPtISROMabTI8O0w10mV9Um 45zIYu5O1VHcag+n+z+o8jDFaT8gYUNfxhzaVgiW7w4nB4Ww0vip+IZqIa7vTSQC g/Gg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id: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=fm1; t=1694135143; x=1694221543; bh=Ytep4XS+zz5E3 IyxGtziqRadCqcgVt8eallLtWjjDuU=; b=Usbt01t11VFTc4enq+U0Pyfx8q0+D BCkBZiQd4J7RSp7KSqqIJXrlr4ABbONGth0Cmd5QhU/CBUyrauQp2j2PtpB7QTmy EIgD3tEOPupFnpH3AkUqyAW7IsmX/u7BbpJjcuFCZ2IkgRZ8DEEoU4gYZcqfs1PD zE2lU+3elPt+Ut0OQGceZ01xc82XK0XpuDcNdoXwL3ym0R0tOeBsclCLYqwE6BDh 2u7wF0q+OfKhJhgcntKaNNPkoiBxav6+SJ65hO2iIOmn43peZ0opHky5/aVxufa0 8LtYEhcIzi+KYhg6Okt+T3PO26McG1UWW0bLDMEJWB77SD9pEgegUiYhw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehiedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Sep 2023 21:05:41 -0400 (EDT) Date: Fri, 8 Sep 2023 10:05:37 +0900 From: Michael Paquier To: Ashutosh Bapat Cc: Junwang Zhao , PostgreSQL Hackers Subject: Re: [BackendXidGetPid] only access allProcs when xid matches Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZKF3e4RZ3zS1ZiCL" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ZKF3e4RZ3zS1ZiCL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 07, 2023 at 04:34:20PM +0530, Ashutosh Bapat wrote: > I would still love to see some numbers. It's not that hard. Either > using my micro benchmark or Michael's. We may or may not see an > improvement. But at least we tried. But Michael feels otherwise, > changing it to RoC is fine. I have hardcoded a small SQL function that calls BackendXidGetPid() in a tight loop a few hundred millions of times, and I see no difference in runtime between HEAD and the patch under -O2. The argument about readability still applies for me, so applied. -- Michael --ZKF3e4RZ3zS1ZiCL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIyBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmT6c2EACgkQnvQgOdby QH3F1g/4jQ1iSspbxznm43MVptzKCtmY0bRe1mN7VKn5LUzD5Z3Szn2C3DkGniuc upiqYAHHTlQFY6kMsba/hy17OgmvzkJXqXi5yXuseC/VO6BJ46gjFj5zwBpZhO2o biEQZigmFa0NObK8NoFbb6wpwSRHZ/LigXoDOvsCciCQ/AIjKSiW8n2hZPjCTmzF R1xR2MVHXsJC66INdEwYs0CSOO9FsECBEP39dLmI4sVqsAY5a9O4rZJGKIv7pA6S jyfKffunXFbKueaBIaT5PHjCAxReYogoQYT/bJbj/7LUGCKoq+179zcqeDNmnzCY RnmfZOLbR0cqXTmZszP2cvDU9mW58R7e79x4Jgriejz0YnWLqP9H3fDywW2SMEDS AkRj3T+g6Dlgdlz6QFAo9ie+e9A0mz5tfJb/bv1HyCgcL/C3PMGX40Ln47i2hOTf OU8DcQ7BxLk8TnuDmJMeGwU+RBS7JWhRSPq/OWqu/JwWuRP9kUlP7NaN56x/4zaT z0aTX7ScphkmzIha8s5zTCwMdYI8cOJFoi80K0ZJhSV7c5xI6U1sO0zlYGcENpx+ sbodOoMlh/iU0lC73aZexjybTTdmumWkzSgbqaK90zem0yOLABFR0nFvRXmi8PAA UU8KwY9r2pYxXZw/gWFeEwEPblzSyt4X421e800JvPLz0Zu6KA== =p/m+ -----END PGP SIGNATURE----- --ZKF3e4RZ3zS1ZiCL--