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

From David G. Johnston
Subject Re: n_ins_since_vacuum stats for aborted transactions
Date
Msg-id CAKFQuwbusg=fbLD611gPvUmLjCAXfPNwy=RvO2+VwHLWozEs=Q@mail.gmail.com
Whole thread Raw
In response to Re: n_ins_since_vacuum stats for aborted transactions  (Sami Imseih <samimseih@gmail.com>)
Responses Re: n_ins_since_vacuum stats for aborted transactions
List pgsql-hackers
On Wed, Apr 9, 2025, 11:57 Sami Imseih <samimseih@gmail.com> wrote:
> Forget original purpose, is there presently a bug or not?

Yes, there is a bug. Accounting rows inserted as part of an aborted
transaction in
n_ins_since_vacuum is not correct, since the same rows are being
accounted for with n_dead_tup.

So why is it important we not account for the aborted insert in both n_ins_since_vacuum and n_dead_tup?

When would you ever add them together so that an actual double-counting would reflect in some total.

You aren't upset that n_live_tup and this both include the non-aborted inserts.

David J.

pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: n_ins_since_vacuum stats for aborted transactions
Next
From: Andres Freund
Date:
Subject: Re: Streaming relation data out of order