Re: pgstat: Flush some statistics within running transactions, take 2

From: Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Lukas Fittl <lukas(at)fittl(dot)com>
Subject: Re: pgstat: Flush some statistics within running transactions, take 2
Date: 2026-11-17 14:08:37
Message-ID: CAN12+YJB31NORSg=99mJJd2K0FFev74wPsPCH9pD0FiuZku-HQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> "
> BEGIN;
> SAVEPOINT s;
> INSERT INTO t SELECT generate_series(1, 5);
> ROLLBACK TO SAVEPOINT s;
>
> SELECT pg_stat_force_next_flush();
>
> TRUNCATE t;
> COMMIT;
>
> SELECT pg_stat_force_next_flush();
> "
>
> produces 5 for n_ins_since_vacuum, while 0 is expected.

0 is expected, I agree. This is an issue on HEAD as well so
not a product of this patch. This should be raised in a
separate thread.

--
Sami

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message He Kuang 2026-11-17 14:09:40 [PATCH v2] Fix hash join costing when the inner side is provably unique
Previous Message Jakub Wartak 2026-11-17 13:53:23 Re: pg_stat_io_histogram