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.96) (envelope-from ) id 1vYZUN-007RPs-0R for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Dec 2025 00:46:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vYZUL-0066l2-38 for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Dec 2025 00:45:58 +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.96) (envelope-from ) id 1vYZUL-0066kr-0M for pgsql-hackers@lists.postgresql.org; Thu, 25 Dec 2025 00:45:58 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vYZUK-002TYZ-0m for pgsql-hackers@postgresql.org; Thu, 25 Dec 2025 00:45:57 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 51E947A00D1; Wed, 24 Dec 2025 19:45:54 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 24 Dec 2025 19:45:54 -0500 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=fm1; t=1766623554; x=1766709954; bh=s6hsVkJ/3f Kg7j4meGUCvnL7qFT5JrWt9pgmXdHMc/w=; b=lfU3UMEvR6jFln6d2iORKwNzRA iujUF44BNIgmFaezEipF59qEhjUa0Z1Vfyp8MI749935w+ss0PnSyaScf3L96Abp KPVRhh0vuYsgLUL2uXUz2uuTrl8R3eKY81jpZ53HAoeekfiEHJGNziugwpwLirr+ 9BjM0G5TyPICymAVDQjtyWT5GBHbkqjeQkbDKmQhktNhmMIorxuqfnKJ6EVBo69e Ckn0qYbn5KXhtlJkNUQ3nRq8DSWMjU5Tqa3a/vROKac7Jz/KrOfn3xYJhgB03haj AXHYfQH5nxhEZ8kfvZZM+2RLuiigI5/j7VqAkjfDLKKu+yJSpHWPDuGoeFTA== 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=fm1; t= 1766623554; x=1766709954; bh=s6hsVkJ/3fKg7j4meGUCvnL7qFT5JrWt9pg mXdHMc/w=; b=fB6CyItd0faUvblHQ4yzOvyDR1M6zhasjNFj3xMOc4WbfWQxSnG HFzpts7/tAnY+4um7L87wfb+jI/DKmv0bACmwcDkhBr4tdhxGrwPHqWrK9zf/4L1 3cG/lKY3dSiIcj5jUeVMaZxWRvLvabBjA66GAdOAT9xvPYTJ0WfybuCZgukZF3v2 aTysOnse62gYaTZR1I0IsgZmctWGDMomq87XIyYNr9fUYy6SxA5ek+4U0bVB8VfZ nMTMRjeUK/mltzUG48pI4zLJURYA7smQzMzzRjEjufWpS4j5zrA3k+vR0Z6VTNRW Qlu8ZAL26Jt9TNMUmHzINhVSwJ8bgKNW8nA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeigedukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtjeen ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeevteejgfejveegudekheeiueeiueei veeuiedugeehveeugffgudeuleegleeiteenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehnrghgnh hrihhksehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghshhhuthhoshhhrdgsrghprght rdhoshhssehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhomhgrshesvhhonhgurhgrrd hmvgdprhgtphhtthhopeiguhhnvghnghiihhhouhesghhmrghilhdrtghomhdprhgtphht thhopehtohhrihhkohhshhhirgesohhsshdrnhhtthgurghtrgdrtghomhdprhgtphhtth hopehrvghshhhkvghkihhrihhllhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhs qhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Dec 2025 19:45:50 -0500 (EST) Date: Thu, 25 Dec 2025 09:45:33 +0900 From: Michael Paquier To: Naga Appani Cc: Ashutosh Bapat , Tomas Vondra , Xuneng Zhou , torikoshia , Kirill Reshke , pgsql-hackers@postgresql.org Subject: Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring Message-ID: References: <95850ce1-2d5e-4271-92ea-c2a02e36b303@vondra.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="70YTOJc8tR3bpLh2" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --70YTOJc8tR3bpLh2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 24, 2025 at 06:09:14PM -0600, Naga Appani wrote: > I=E2=80=99ve updated the patch as suggested. >=20 > The member storage size calculation has been refactored into a static > inline function, MultiXactMemberStorageSize(), in > src/include/access/multixact_internal.h. >=20 > Please find v13 attached. Seems basically sensible here for the structure, including the hints and recommendations for the GUCs. + of multixact member entries created exceeds approximately 2^31 entries [...] + This output shows a system with significant multixact activity: about= ~312 million + multixact IDs and ~2.8 billion member entries consuming 13 GB of stor= age space. The documentation could be improved more. The power '^' and tilde symbols are not used for references. If any, I'd encourage using wordings like "2 billion" entries for all these paragraphs across the board. For the tilde part, you would mean "at least" or "at most" rather than the boundaries implied with the tilde (aka we should not expect the reader the mental effort to translate and understand what these symbols mean, especially for non-native English speaker). + Detect potential performance impacts before they become critical. + For instance, high multixact usage from frequent row-level locking= or + foreign key operations can lead to increased I/O and CPU overhead = during + vacuum operations. Monitoring these stats helps tune autovacuum fr= equency + and transaction patterns. Saying that, this paragraph does not seem that useful to me, especially the last sentence which is evasive and can apply to anything related to monitoring. The second hint is more useful, but perhaps we should mention which GUC(s) should be touched to make num_members go lower? As a whole, the orderedlist does not seem strongly necessary to me: the third item is evasive, the first and second items describe problematic patterns and what could cause them. As a whole, for the docs part, the new additions in the existing paragraph of maintenance.sgml are OK for me. The first part of the new paragraph added also provides some direct information about how useful this new function is to evaluate the amount of disk space used. I'd like to think that we should just complete it the two facts about num_mxids and num_members you are listing, with two sentences appended at the end of the new paragraph rather than a list of items. If we don't completely agree about the "hint" part, we could split the patch in two for now: let's add the function first, then discuss more about what kind of tweaks and patterns we want to document as a set of follow-up changes. It does not change the fact that the function is useful for disk-space monitoring purposes. The patterns and hints are a second different matter. -- Michael --70YTOJc8tR3bpLh2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmlMiS0ACgkQnvQgOdby QH03uA//TzaxJtJgtdIbmQEI3sFSOx09kiaPX+5EWsbMtECSZew6IOFn9wZ/vP+B jgcrLBDkv3dYb238Xl73OEB3mxORj9aVbHD5AkgbY5TEU8vE2W2QeMPm1EiWsGmq l2kpcOrXuP3W6wcJz+562d06cdQB1UFbswsPs9pvnQFvcxvXbfz4neN92gSASjZd 02Ya62ik3HcyFBl14NPUCOLP3qbfUtDdOVXxFmt3zF9LJqsV19HrPeVz1H05ETkn aOuSFAiRSNdAl5Fg+X34jpxqIexCe2ySM1rutZdEU5gqjY5criwN9TMqM8fBgboj nwTce3e9ckrHloO7PMbzZg4/1plWal5DZ/9Q1D9qW15lJmBtsVaM3MuYvvq5Kd9r TUEd4RjUYS4tMl3mP60IdqG3uQCZrOBac2koB5fLooTLHMpq9gSMs0f5iUftEOMO PbF1C+2n4VDpelwusJpOKmZrDewgPzFWKZ8cvhgLC9zwdA1dSZaxmQf9Uf07MCQS /b2IK1e4Pvloog36CT5CPZ0Wf31TpjdRymZ6BomAtLs1eA+EI1hUyw7wtCdCV2I4 HmMFvt5P2leNc35VDHv7dPooUaYkCziYtKwzvgtLeLURaMwnhp5NQFmRGUnBmeVe lfLsITVFaygd3UUM4T9AUBRDeRRNRm0J7BhliAptbfulFU304Nw= =cEM0 -----END PGP SIGNATURE----- --70YTOJc8tR3bpLh2--