cfbot showed a few Linux failures that were not reliably reproducible. The
failure was an assertion from pgstat_shutdown_hook() calling
pgstat_report_stat() while stats were already being flushed.
I fixed that by making pgstat_shutdown_hook() avoid a recursive flush. The
failure happens when we hit a FATAL while flushing stats. Process exit runs
pgstat_shutdown_hook() before the PG_FINALLY in the original
pgstat_report_stat() call has reset pgStatFlushInProgress.
v16 attached.
--
Sami Imseih
Amazon Web Services (AWS)