Re: n_ins_since_vacuum stats for aborted transactions - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: n_ins_since_vacuum stats for aborted transactions
Date
Msg-id CAA5RZ0u1pN4Xi3PeZFDAt8OpPzkJ4FkS1GnN3KSHzWTHGsa5Kw@mail.gmail.com
Whole thread Raw
In response to Re: n_ins_since_vacuum stats for aborted transactions  ("Euler Taveira" <euler@eulerto.com>)
Responses Re: n_ins_since_vacuum stats for aborted transactions
List pgsql-hackers
> This is *not* an oversight. It is by design. See commit b07642dbcd8d. The
> documentation says

I don't see in the commit message why inserts in an aborted transaction
must count towards n_ins_since_vacuum.

>   Estimated number of rows inserted since this table was last vacuumed
>
> Those rows were actually inserted. They are physically in the data files. And
> that's what matters for the autovacuum algorithm.

Correct,but they are dead tuples that are physically in the files, and
are accounted for through
n_dead_tup and are then cleaned up based on the
autovacuum_vacuum_scale_factor|threshold
calculation.

The purpose of b07642dbcd8d is to trigger autovacuum for append only/mainly
workloads that don't generate dead tuples.

--
Sami Imseih
Amazon Web Services (AWS)



pgsql-hackers by date:

Previous
From: "Euler Taveira"
Date:
Subject: Re: n_ins_since_vacuum stats for aborted transactions
Next
From: Jacob Champion
Date:
Subject: Re: Adding support for SSLKEYLOGFILE in the frontend