pgsql: Change the pgstat logic so that the stats collector writes the - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Change the pgstat logic so that the stats collector writes the
Date
Msg-id 20081103011708.C9AA17545A4@cvs.postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Remove the last vestiges of the MAKE_PTR/MAKE_OFFSET mechanism.
Next
From: mha@postgresql.org (Magnus Hagander)
Date:
Subject: pgsql: Fix incorrect comment in SSL code