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+YKm93AOjAMqzTZquWrD-CB5FroJAECGxqQpL_yfnDkHgA@mail.gmail.com
Whole thread
Responses Re: use of SPI by postgresImportForeignStatistics
Re: pgstat: Flush some statistics within running transactions, take 2
List pgsql-hackers
Here is v9- with:

1/ to also pgStatFlushInProgress when we're-queueing

pgstat_prep_pending_from_entry_ref(PgStat_EntryRef *entry_ref)
{
...
....
else if (pgStatFlushInProgress && entry_ref->flushed_this_pass)
...
...
}

2/ Added an `Assert(!pgStatFlushInProgress);` inside pgstat_report_stat().

This should never be called while there is a flush in progress.

--
Sami

Attachment

pgsql-hackers by date:

Previous
From: Alberto Piai
Date:
Subject: Re: Adding a stored generated column without long-lived locks
Next
From: Jeff Davis
Date:
Subject: Re: Commit Sequence Numbers and Visibility