public inbox for [email protected]  
help / color / mirror / Atom feed
From: Achilleas Mantzios - cloud <[email protected]>
To: [email protected]
Subject: Re: number of updated or deleted tuples needed to trigger a VACUUM in any one table
Date: Fri, 8 Nov 2024 15:57:28 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CANzqJaDh3vYp2dej87Oq=gOTrQS-3C9kOPgGgTeEQa7ku9bRDA@mail.gmail.com>
References: <CANzqJaDh3vYp2dej87Oq=gOTrQS-3C9kOPgGgTeEQa7ku9bRDA@mail.gmail.com>


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 <Redacted>, and butter sauce.
> Don't boil me, I'm still alive.
> <Redacted> lobster!

view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: number of updated or deleted tuples needed to trigger a VACUUM in any one table
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox