Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c2313f

Browse files
committed
Change the pgstat logic so that the stats collector writes the stats file only
upon requests from backends, rather than on a fixed 500msec cycle. (There's still throttling logic to ensure it writes no more often than once per 500msec, though.) This should result in a significant reduction in stats file write traffic in typical scenarios where the stats are demanded only infrequently. This approach also means that the former difficulty with changing stats_temp_directory on-the-fly has gone away, so remove the caution about that as well as the thrashing we did to minimize the trouble window. In passing, also fix pgstat_report_stat() so that we will send a stats message if we have function call stats but not table stats to report; this fixes a bug in the recent patch to support function-call stats. Martin Pihlak
1 parent d7112cf commit 3c2313f

File tree

3 files changed

+204
-65
lines changed

3 files changed

+204
-65
lines changed

doc/src/sgml/config.sgml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.191 2008/09/30 10:52:09 heikki Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.192 2008/11/03 01:17:08 tgl Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -3347,9 +3347,6 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
33473347
improved performance.
33483348
This parameter can only be set in the <filename>postgresql.conf</>
33493349
file or on the server command line.
3350-
If this parameter is changed while the server is running, there is a
3351-
small window of time until the new statistics file has been written
3352-
during which the statistics functions might return no information.
33533350
</para>
33543351
</listitem>
33553352
</varlistentry>

0 commit comments

Comments
 (0)