Re: pgstat: Flush some statistics within running transactions, take 2 - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: pgstat: Flush some statistics within running transactions, take 2
Date
Msg-id CAN12+Y+_+vehMn8eRPH7Baf5g5JGsSoYJ3be+K=pmtaUVo+szw@mail.gmail.com
Whole thread
In response to Re: pgstat: Flush some statistics within running transactions, take 2  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
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)

Attachment

pgsql-hackers by date:

Previous
From: Greg Burd
Date:
Subject: Re: Comments for lossy ORDER BY are lacking
Next
From: Greg Burd
Date:
Subject: Re: Comments for lossy ORDER BY are lacking