Re: n_ins_since_vacuum stats for aborted transactions

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: Euler Taveira <euler@eulerto.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-04-09T20:13:34Z
Lists: pgsql-hackers
On Wed, Apr 9, 2025, 12:56 Sami Imseih <samimseih@gmail.com> wrote:

>
> What I am saying is n_ins_since_vacuum should not account for aborted
> inserts.
>

It does and from what I can see it should.  You need to explain why it
should not.  More importantly, convincingly enough to change five year old
behavior.

You should get away from showing counts and talk about system behavior.
Or, if this is accounting related, explain the math.

David J.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add code comment explaining ins_since_vacuum and aborted inserts

  2. Trigger autovacuum based on number of INSERTs