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 1t9QQd-00A4iR-8O for pgsql-admin@arkaria.postgresql.org; Fri, 08 Nov 2024 14:57:38 +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 1t9QQa-00A5Qz-Iu for pgsql-admin@arkaria.postgresql.org; Fri, 08 Nov 2024 14:57:37 +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 1t9QQa-00A5Qr-76 for pgsql-admin@lists.postgresql.org; Fri, 08 Nov 2024 14:57:36 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t9QQX-000ows-BU for pgsql-admin@lists.postgresql.org; Fri, 08 Nov 2024 14:57:35 +0000 Content-Type: multipart/alternative; boundary="------------mlseVOqYJw5vdVnFsXrH259U" Message-ID: <3745e187-bf8f-48f8-8311-8da66eaff1cc@cloud.gatewaynet.com> Date: Fri, 8 Nov 2024 15:57:28 +0100 MIME-Version: 1.0 Subject: Re: number of updated or deleted tuples needed to trigger a VACUUM in any one table To: pgsql-admin@lists.postgresql.org References: Content-Language: en-US From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------mlseVOqYJw5vdVnFsXrH259U Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/7/24 16:30, Ron Johnson wrote: > > https://www.postgresql.org/docs/current/runtime-config-autovacuum.html > > |autovacuum_vacuum_threshold| (|integer|) > > Specifies the minimum number of updated or deleted tuples needed > to trigger a |VACUUM| in any one table. > > > Are the number of updated and deleted tuples since the last vacuum > exposed anywhere, like n_ins_since_vacuum is exposed? By /usr/local/src/postgresql-17.0/src/backend/postmaster/autovacuum.c:3026 : reltuples = classForm->reltuples;                vactuples = tabentry->dead_tuples;                instuples = tabentry->ins_since_vacuum;                anltuples = tabentry->mod_since_analyze; So, this number should be the pg_stat_all_tables.n_dead_tup > > I've Googled with no luck. > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! --------------mlseVOqYJw5vdVnFsXrH259U Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 11/7/24 16:30, Ron Johnson wrote:


autovacuum_vacuum_threshold (integer

Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table.


Are the number of updated and deleted tuples since the last vacuum exposed anywhere, like n_ins_since_vacuum is exposed?

By /usr/local/src/postgresql-17.0/src/backend/postmaster/autovacuum.c:3026 :

               reltuples = classForm->reltuples;
               vactuples = tabentry->dead_tuples;
               instuples = tabentry->ins_since_vacuum;
               anltuples = tabentry->mod_since_analyze;

So, this number should be the pg_stat_all_tables.
n_dead_tup


I've Googled with no luck.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
--------------mlseVOqYJw5vdVnFsXrH259U--