Re: Flush some statistics within running transactions

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Flush some statistics within running transactions
Date: 2026-01-20 23:18:41
Message-ID: CAN4CZFNT2E2UNHmYVwsYS-Hy6MNZgj0+bEL4pwHaMoRd-Qd5HQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

@@ -264,6 +266,12 @@ typedef struct PgStat_KindInfo
/* Flush behavior */
PgStat_FlushBehavior flush_behavior;

+ /*
+ * For PGSTAT_FLUSH_MIXED kinds: callback to flush only some fields. If
+ * NULL for a MIXED kind, treated as PGSTAT_FLUSH_AT_TXN_BOUNDARY.
+ */
+ bool (*flush_anytime_cb) (PgStat_EntryRef *entry_ref, bool nowait);
+

The comment seems to use incorrect names, shouldn't be FLUSH_MIXED and
FLUSH_AT_TXN_BOUNDARY without PGSTAT_?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-01-20 23:35:43 Re: pg_stat_statements: Fix nested tracking for implicitly closed cursors
Previous Message Jacob Champion 2026-01-20 23:17:37 Re: [PATCH] Reserve protocol 3.1 explicitly in pqcomm.h