On Sat, Oct 17, 2026 at 09:46:01PM -0500, Sami Imseih wrote: > We need to force a flush when test_custom_stats_var_update(), which calls > pgstat_prep_pending_entry(), is followed by test_custom_stats_var_report() > from another backend. This is only the case for the batched updates.
@@ -86,7 +86,8 @@ foreach my $stats_kind (@var_stats_kinds)
q(select test_custom_stats_var_update(name)
from (values ('entry1', 2), ('entry2', 3),
('entry3', 2), ('entry4', 3)) as stats(name, n),
- generate_series(1, n)));
+ generate_series(1, n);
+ select pg_stat_force_next_flush()));
Yes, an extra pg_stat_force_next_flush() should be enough to make the
tests stable. Will apply. Thanks for the patch.
--
Michael
signature.asc
Description: PGP signature
