Re: n_ins_since_vacuum stats for aborted transactions

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: n_ins_since_vacuum stats for aborted transactions
Date: 2025-04-09 19:31:03
Message-ID: CAKFQuwbusg=fbLD611gPvUmLjCAXfPNwy=RvO2+VwHLWozEs=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 9, 2025, 11:57 Sami Imseih <samimseih(at)gmail(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-04-09 19:35:43 Re: Streaming relation data out of order
Previous Message Mark Dilger 2025-04-09 19:22:48 Re: n_ins_since_vacuum stats for aborted transactions