Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit89b81f0

Browse files
committed
Fix possible failure to send final transaction counts to stats collector.
Normally, we suppress sending a tabstats message to the collector unlessthere were some actual table stats to send. However, during backend exitwe should force out the message if there are any transaction commit/abortcounts to send, else the session's last few commit/abort counts will neverget reported at all. We had logic for this, but the short-circuit testat the top of pgstat_report_stat() ignored the "force" flag, with theconsequence that session-ending transactions that touched no database-localtables would not get counted. Seems to be an oversight in my commit641912b, which added the "force" flag.That was back in 8.3, so back-patch to all supported versions.
1 parentacf290d commit89b81f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/postmaster/pgstat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,8 @@ pgstat_report_stat(bool force)
685685
inti;
686686

687687
/* Don't expend a clock check if nothing to do */
688-
if ((pgStatTabList==NULL||pgStatTabList->tsa_used==0)
689-
&& !have_function_stats)
688+
if ((pgStatTabList==NULL||pgStatTabList->tsa_used==0)&&
689+
!have_function_stats&& !force)
690690
return;
691691

692692
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp