Hi,
On 2022-05-19 22:58:14 -0400, Tom Lane wrote:
> What I am wondering about at this point is whether the effects of
> pg_stat_force_next_flush() could somehow be delayed until after we
> have told the client the command is complete.
It shouldn't - it just forces pg_stat_report_stat() to flush (rather than
doing so based on the time of the last report). And pg_stat_report_stat()
happens before ReadyForQuery().
Hm. Does the instability vanish if you switch s2_commit_prepared_a and s1_ff?
Greetings,
Andres Freund