public inbox for [email protected]  
help / color / mirror / Atom feed
number of updated or deleted tuples needed to trigger a VACUUM in any one table
2+ messages / 2 participants
[nested] [flat]

* number of updated or deleted tuples needed to trigger a VACUUM in any one table
@ 2024-11-07 15:30  Ron Johnson <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Ron Johnson @ 2024-11-07 15:30 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

https://www.postgresql.org/docs/current/runtime-config-autovacuum.html

autovacuum_vacuum_threshold (integer)
<https://www.postgresql.org/docs/current/runtime-config-autovacuum.html#GUC-AUTOVACUUM-VACUUM-THRESHO...;

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?

I've Googled with no luck.

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: number of updated or deleted tuples needed to trigger a VACUUM in any one table
@ 2024-11-08 14:57  Achilleas Mantzios - cloud <[email protected]>
  parent: Ron Johnson <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Achilleas Mantzios - cloud @ 2024-11-08 14:57 UTC (permalink / raw)
  To: [email protected]


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!

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-11-08 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-07 15:30 number of updated or deleted tuples needed to trigger a VACUUM in any one table Ron Johnson <[email protected]>
2024-11-08 14:57 ` Achilleas Mantzios - cloud <[email protected]>

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