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 1trwDi-00CDHd-8l for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Mar 2025 09:48:18 +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 1trwDg-00CTcI-Uy for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Mar 2025 09:48:16 +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 1trwDg-00CTcA-LI for pgsql-hackers@lists.postgresql.org; Tue, 11 Mar 2025 09:48:16 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1trwDd-002D3f-16 for pgsql-hackers@postgresql.org; Tue, 11 Mar 2025 09:48:16 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-30bf7d0c15eso44217261fa.0 for ; Tue, 11 Mar 2025 02:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741686494; x=1742291294; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SD5yUDbjS/jonnh2Jzqc0EIGZWlurwnJQCGyebQkvTM=; b=gD6i/jF0F8zxeimG3d3xAArT/FueRPtQ0hEoVUg1X4hz7G2jVCrF84RHx41JqloAIi eEBVGW/qKSuFd7F3ov25qIakwfSUM7Ye6YJ/1liuD3O0a03lSL0ZbDJOPUbPC3NJILC0 +ta4RDMY+kzx2ND/MXMIuqFbSbD0p3tfflh+P8GY1DTD+Ny06loQ5QiJEx52JKJlkrfM KB4v8yhrHuJzecN8n4CnNIUee3UzBAAOm+LW5qjvchf7uxUMNZ5eFT70xn2HswnhsdTi YagnsYPvV0rCAkQpMIAwFTcM+yft4aXB+elXB4qhLTvusKxGpnWQBnAZGZ7cMINHJP3n 5jkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741686494; x=1742291294; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SD5yUDbjS/jonnh2Jzqc0EIGZWlurwnJQCGyebQkvTM=; b=L1Zx+xH6y507eS+ICOqaQcZPLOtNQGEGy25S/DdBnHtcb3LF8G7SpeQPyvWo+2nV7T 7kjJiq6eWrZMTSGCYP2kHv1cYL48s46ANp1DDpVf36mAycIYRaTcC2oyyLWtaVhQo95R J2+FX2I7dHAr/IjMCQ++EYRoEnfY8wKv2eylOPjWmWzOGshYpcMNuFR/tM0fcoZZRZ9X W3CQaZz23v2tYBFr8FCf8wYuA1iyIM2gdAWdhcH7M9fVaQAggsrPjyqPOSJG5sENg2FT QFOVb5FMQJLIHcG6JLN5Q7BANvI7rK5Jzq1dvfYtITOgxpl3yl97DBECO1O/9AsauiSL d4zA== X-Gm-Message-State: AOJu0YwmrHgGJpvw5+LVjLzonoIVvBNudLH1w8ECoCsGbny7B2HvcS8Y aUnx6nenuKACCdatW6LG6lIwEUX+SbA6g35Vh8gAw1Kzus29Te9VjxKXtTVPExetT5hmHB1zMQS dyg/7/AKTgKUPoO6AuLydoRh5j1r8WT+kbls= X-Gm-Gg: ASbGncveyLHbd2WECd4lKy6s+BU4lIdNWZKbUWhE2sA9KhqXX6ZG9DXhevqNcsLYK0x OlI44h/KMyjOIhu12wn6/BmVYFEIpBO9i08OhTGIQ+nuNdSmvNXE1aoTFLvFOpmE67AA1EkRDOj eZ8+Xy18+Qo4481ABvSqhlVJzwA0pm8ohIdQL2wwDGjqUgFWRBNdNPu3s= X-Google-Smtp-Source: AGHT+IE8e9jgWAnp+5C2ce2CrKPxi4IpLuNPA8zBhmc2NoDDXiobu6lWeq+KyePxiH2ObwViCKDx6aTgouj+gi5DCe4= X-Received: by 2002:a2e:be9b:0:b0:30b:fdc0:5e5d with SMTP id 38308e7fff4ca-30bfdc060e0mr49393991fa.4.1741686493560; Tue, 11 Mar 2025 02:48:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kirill Reshke Date: Tue, 11 Mar 2025 14:48:01 +0500 X-Gm-Features: AQ5f1JoMPND3ly00nvpHOI4utZXm78ta9kDcOmd-M2RZ4vfuU-oKZtY1O-CLyts Message-ID: Subject: Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring To: Naga Appani Cc: pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 11 Mar 2025 at 14:37, Naga Appani wrote: > > > > On Mon, Mar 10, 2025 at 10:43=E2=80=AFAM Naga Appani = wrote: >> >> Hi, >> Hi > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Proposal > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > The internal ReadMultiXactCounts() function, implemented in multixact.c, = directly calculates the number of MultiXact members by reading live state f= rom shared memory. This approach avoids the performance issues of the curre= nt filesystem-based estimation methods. This proposal looks sane. It is indeed helpful to keep an eye out for multixact usage in systems that are heavily loaded. > By exposing ReadMultiXactCounts() for external use, we can provide Postgr= eSQL users with an efficient way to monitor MultiXact member usage. This co= uld be particularly useful for integrating with tools like Amazon RDS Perfo= rmance Insights and Amazon CloudWatch to provide enhanced database insights= and proactive managed monitoring for users. > > Please let me know if this approach is acceptable, so I=E2=80=99ll go ahe= ad and submit a patch. Let's give it a try! --=20 Best regards, Kirill Reshke