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 1uoFtX-0019x6-Me for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2025 06:32:33 +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 1uoFtW-006tqf-SD for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2025 06:32:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uoFtW-006tqX-I1 for pgsql-hackers@lists.postgresql.org; Tue, 19 Aug 2025 06:32:31 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uoFtV-000ehF-03 for pgsql-hackers@postgresql.org; Tue, 19 Aug 2025 06:32:30 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id 6B160EC08C5; Tue, 19 Aug 2025 02:32:26 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Tue, 19 Aug 2025 02:32:26 -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:subject :subject:to:to; s=fm3; t=1755585146; x=1755671546; bh=7oygJ7TZPF bxLEEdH/QyZryrtIBMCWNDiHpm1CqV2VU=; b=ABGEaQW3F2AfzN8qH3pgd+Z+V/ FY883gyp81SiUt8WUuxz1CUHSzXvO3Qivxi25Mkrqwu72M0G4JnGjDFoZxdhcgH7 69UwXWZU4pgCxUH32+3Vuq+oDczNDqgud+8waBskmFWqZZEpFRrO+Mb8G9V753ti BDL+0vriMNKAWYs9cTT0eTD1982pUy8wrWGQGOS/Kyjr10mrIrqMSA3iqyXpiddu 8WENNL9HG515bWkUz8BH1JAbuLgB8MppWUmS/AZ016I/f8tNEJiMkj7j6MhURgRR Urs195EhJGqC9buGPPFufMQKZn1tpek5wR8kZ1SG5TfLhrXsSd4Tu0bFfr3w== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1755585146; x=1755671546; bh=7oygJ7TZPFbxLEEdH/QyZryrtIBMCWNDiHp m1CqV2VU=; b=hN19O1wGnI/q7zxb/BmZ9bnolhS5wyD3B2X2vxPWreAuyMdYO04 3edVpjLz9nheHmcwHU2UyhF97vp1vyNktCfCOXlrCQIfNt+WgiWysKR3VGjnOoRo cNLarIV0hdytX5JOUPzrWB2SVQonUUUDzu2n4/T50vwdKEWCUoUPC1lHZ3XWlyEE pUlximUxOgVKbYzLQdS6EAkmF/b3q0UQL+aQJ1bXni25C+38Ag8Y1qdctgB/dAWU 3Wy6Gt0cWPHyGcyDoKaK8BT66/CjcXLHqANSZhxLj6v7GWsgbQm+Nw0r2IUSRHMu Bu3sPKtIhhtUruJ7EL8l1U01ZuCnj75O6Hw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduheegjeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttdej necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepveetjefgjeevgedukeehieeuieeu ieevueeiudegheevuefggfduueelgeelieetnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepnhgrgh hnrhhikhesghhmrghilhdrtghomhdprhgtphhtthhopegrshhhuhhtohhshhdrsggrphgr thdrohhsshesghhmrghilhdrtghomhdprhgtphhtthhopehrvghshhhkvghkihhrihhllh esghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhs thhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Aug 2025 02:32:23 -0400 (EDT) Date: Tue, 19 Aug 2025 15:32:19 +0900 From: Michael Paquier To: Naga Appani Cc: Ashutosh Bapat , Kirill Reshke , pgsql-hackers@postgresql.org Subject: Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="32qRhRuBXHbgTkuG" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --32qRhRuBXHbgTkuG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 18, 2025 at 08:32:39PM -0500, Naga Appani wrote: > Thanks a lot for taking the time to review this patch and share your thou= ghts. >=20 > Here=E2=80=99s a short summary of what has changed in v5: > - Added the new pg_get_multixact_stats() function in multixactfuncs.c. > - Fixed the misleading =E2=80=9Catomic read=E2=80=9D comment in the acces= sor. > - Clarified documentation: thresholds are described in terms of > counts, since that=E2=80=99s what the code uses. > - Added a members_bytes column in pg_get_multixact_stats() to give > users a rough size estimate (num_members * 5), while making it clear > this is layout-dependent. >=20 > Please see my in-line replies below. FWIW, I think that you should be a bit more careful before sending updated patch sets. You have missed an extra point I have raised upthread about the refactoring pieces: the switch from ReadMultiXactCounts() to GetMultiXactInfo() can be done in a patch of its own. So I have extracted this part from your latest patch, and applied it independently of the SQL function business. Now we are in an advantageous position on HEAD: even if we do not conclude about the SQL function to show the mxact numbers and offsets, we have the function that gives an access to the data you are looking for. In short, it is now possible to provide an equivalent of the feature you want outside of core. Not saying that the patch cannot be useful, but such refactoring pieces open more possibilities, and offer a cleaner commit history with less churn in the main patches. -- Michael --32qRhRuBXHbgTkuG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmikGnMACgkQnvQgOdby QH2auw//abP62tpuMBmeNW5f/3NYx2GqpHqwy3gbg4zlJ3IwVqNgM8v8aTVL5IpH RmsigpGkd7Mth7ZWUXc60XGSSfrQJwWvAyawYf4RYmmo4TwNbN+w98bBTj/CNFvr ccB4xQhD8kCNRnSh3qr5bYbvHNeugpdoMqt1/eHbhOnc7kdEEN/Z338oQ4SZn1ss +rdoMY6MWi2+yOstugXZFDWlgODOO4dWJNl1ZiA/ohEAmygPFg54aao5o9bWC0Pi X3OlBmsmKDTT3MDrOy1ChTC7vKLGYoYKe6VkE94Vq1f2fq6DsrWWyp4NBhNVMmS1 R94+6Zi5bh6iP3g+B1YMgsqpwoT2DlQIWXU4BjrRky3DYiQ2wHnzVimMLpdA0Pii RNmqYhf4E5StNJvV+mH9Fd0Ne+RO3hgDFbYhm3hY4lrrU6itDbUN22Gf+WIek0I2 Ifthepq2F8SVu2A54otWKg3y3/c4AOFaI23J677JBoVQVRtRiDuWPZVWn/GBM8RN +qG5MFrHF16deZeF4ZInPYfM2Lp/kt4SWiE5OjDVdum+Je5urktPjhOOeHFbI583 C2VPON8qy1FfYpR5rLSLa8+1R7aUJ/ySQn4DS0haO43cIOVywGiTHiLBAXyEfFZN c3CpRc3nmZ62b/a8s3pIuBifwTN471DNstzzSd3FyORRxcxmxPs= =6KqC -----END PGP SIGNATURE----- --32qRhRuBXHbgTkuG--