summaryrefslogtreecommitdiff
path: root/src/include/pgstat.h
diff options
context:
space:
mode:
authorAndres Freund2022-04-07 06:35:56 +0000
committerAndres Freund2022-04-07 06:35:56 +0000
commit0f96965c658147d6d6bad096d2d4a2c9c665f4a9 (patch)
treec85e8f11ecbabf23f1e778236c5b5b097124d4ee /src/include/pgstat.h
parent5e07d3d6bdbff998eb68c131ecd10c448b026e47 (diff)
pgstat: add pg_stat_force_next_flush(), use it to simplify tests.
In the stats collector days it was hard to write tests for the stats system, because fundamentally delivery of stats messages over UDP was not synchronous (nor guaranteed). Now we easily can force pending stats updates to be flushed synchronously. This moves stats.sql into a parallel group, there isn't a reason for it to run in isolation anymore. And it may shake out some bugs. Bumps catversion. Author: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r--src/include/pgstat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 8ac3860e8d4..a0b853f4a69 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -414,6 +414,7 @@ extern void pgstat_initialize(void);
/* Functions called from backends */
extern long pgstat_report_stat(bool force);
+extern void pgstat_force_next_flush(void);
extern void pgstat_reset_counters(void);
extern void pgstat_reset(PgStat_Kind kind, Oid dboid, Oid objectid);