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 1upFeL-001idb-KD for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Aug 2025 00:28:58 +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 1upFeK-002B0T-LT for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Aug 2025 00:28:57 +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 1upFeK-002B0K-7n for pgsql-hackers@lists.postgresql.org; Fri, 22 Aug 2025 00:28:56 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1upFeH-0016Ro-0b for pgsql-hackers@postgresql.org; Fri, 22 Aug 2025 00:28:55 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id E00E861C28; Fri, 22 Aug 2025 09:28:49 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Fri, 22 Aug 2025 09:28:49 +0900 From: torikoshia To: Naga Appani Cc: Michael Paquier , Ashutosh Bapat , Kirill Reshke , pgsql-hackers@postgresql.org Subject: Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: torikoshia@oss.nttdata.com Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-08-20 13:27, Naga Appani wrote: Thanks for working on this! > On Tue, Aug 19, 2025 at 1:32=E2=80=AFAM Michael Paquier =20 > wrote: >> 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. >>=20 >> 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. >> -- >=20 > Thanks for the review and separating the refactoring into its own=20 > commit. > Point taken on being more careful when sending updated patch sets. > I=E2=80=99ll make sure to keep > refactoring and SQL layer changes clearly separated going forward. >=20 > Attached is v6, rebased on top of HEAD. This version is limited to the > SQL function only. >=20 diff --git a/doc/src/sgml/maintenance.sgml=20 b/doc/src/sgml/maintenance.sgml index e7a9f58c015..6f0e8d7c10a 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -813,12 +813,56 @@ HINT: Execute a database-wide VACUUM in that=20 database. As a safety device, an aggressive vacuum scan will occur for any table whose multixact-age is greater than . Also, if th= e - storage occupied by multixacts members exceeds about 10GB,=20 aggressive vacuum + linkend=3D"guc-autovacuum-multixact-freeze-max-age"/>. Also, if the= =20 number + of members created exceeds approximately 2^31 entries, aggressive=20 vacuum scans will occur more often for all tables, starting with those=20 that Looking at commit ff20ccae9fdb, it seems that the documentation was=20 intentionally written in terms of gigabytes rather than the number: > The threshold is two billion members, which was interpreted as 2GB > in the documentation. Fix to reflect that each member takes up five > bytes, which translates to about 10GB. This is not exact, because of > page boundaries. While at it, mention the maximum size 20GB. Anyway, I also think, as Ashutosh suggested, that if we want to fix this=20 documentation, it would be better to do so in a separate patch. --=20 Regards, -- Atsushi Torikoshi Seconded from NTT DATA Japan Corporation to SRA OSS K.K.