aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2023-06-12 15:06:12 -0700
committerAndres Freund <andres@anarazel.de>2023-06-12 15:06:39 -0700
commite3cb1a586cef746326eeabf36d103ea1136607f9 (patch)
tree56a632afea994fe333da12ed11e482c75087e73a /src/backend/executor/execMain.c
parent7398e27224f173306e5b62977672b29f5553ee76 (diff)
downloadpostgresql-e3cb1a586cef746326eeabf36d103ea1136607f9.tar.gz
postgresql-e3cb1a586cef746326eeabf36d103ea1136607f9.zip
Report stats when replaying XLOG_RUNNING_XACTS
Previously stats in the startup process would only get reported during shutdown of the startup process. It has been that way for a long time, but became a lot more noticeable with the new pg_stat_io view, which separates out IO done by different backend types... While replaying after every XLOG_RUNNING_XACTS isn't the prettiest approach, it has the advantage of being quite easy. Given that we're well past feature freeze... It's not a problem that we don't report stats more frequently with wal_level=minimal, in that case stats can't be read before the stats process has shut down. Besides the above, this commit also changes pgstat_report_stat() to acquire the timestamp with GetCurrentTimestamp() instead of GetCurrentTransactionStopTimestamp(). Thanks to Melih Mutlu, Kyotaro Horiguchi for prototypes of other approaches to solving this issue. Reported-by: Fujii Masao <masao.fujii@oss.nttdata.com> Discussion: https://postgr.es/m/5315aedc-fbca-1556-c5de-dc2e00b23a14@oss.nttdata.com
Diffstat (limited to 'src/backend/executor/execMain.c')
0 files changed, 0 insertions, 0 deletions