Re: n_ins_since_vacuum stats for aborted transactions

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(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 18:57:44
Message-ID: CAA5RZ0upB-TYCxqpbidgbHMSm_v0GHh39AQDUQmrdohpW6YDsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

> Between the two options the one where we count dead tuples makes more sense on its face.

IIUC, I am saying the same thing, if an inserted row is rolled back,
it should only count as a
dead tuple (n_dead_tup) only, and not in n_ins_since_vacuum.

--
Sami Imseih
Amazon Web Services (AWS)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-04-09 18:59:14 Re: Draft for basic NUMA observability
Previous Message David G. Johnston 2025-04-09 18:49:07 Re: n_ins_since_vacuum stats for aborted transactions