pgsql: Change the pgstat logic so that the stats collector writes the

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change the pgstat logic so that the stats collector writes the
Date: 2008-11-03 01:17:08
Message-ID: 20081103011708.C9AA17545A4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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

Modified Files:
--------------
pgsql/doc/src/sgml:
config.sgml (r1.191 -> r1.192)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml?r1=1.191&r2=1.192)
pgsql/src/backend/postmaster:
pgstat.c (r1.181 -> r1.182)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c?r1=1.181&r2=1.182)
pgsql/src/include:
pgstat.h (r1.78 -> r1.79)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/pgstat.h?r1=1.78&r2=1.79)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2008-11-03 14:18:57 pgsql: Fix incorrect comment in SSL code
Previous Message Tom Lane 2008-11-02 21:24:52 pgsql: Remove the last vestiges of the MAKE_PTR/MAKE_OFFSET mechanism.