pgsql: Implement rate-limiting logic on how often backends will attempt

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Implement rate-limiting logic on how often backends will attempt
Date: 2007-04-30 03:23:50
Message-ID: 20070430032350.2BB129FB1F4@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Implement rate-limiting logic on how often backends will attempt to send
messages to the stats collector. This avoids the problem that enabling
stats_row_level for autovacuum has a significant overhead for short
read-only transactions, as noted by Arjen van der Meijden. We can avoid
an extra gettimeofday call by piggybacking on the one done for WAL-logging
xact commit or abort (although that doesn't help read-only transactions,
since they don't WAL-log anything).

In my proposal for this, I noted that we could change the WAL log entries
for commit/abort to record full TimestampTz precision, instead of only
time_t as at present. That's not done in this patch, but will be committed
separately.

Modified Files:
--------------
pgsql/src/backend/access/transam:
xact.c (r1.240 -> r1.241)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c.diff?r1=1.240&r2=1.241)
pgsql/src/backend/commands:
analyze.c (r1.106 -> r1.107)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/analyze.c.diff?r1=1.106&r2=1.107)
vacuumlazy.c (r1.87 -> r1.88)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuumlazy.c.diff?r1=1.87&r2=1.88)
pgsql/src/backend/postmaster:
pgstat.c (r1.153 -> r1.154)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.153&r2=1.154)
pgsql/src/backend/utils/adt:
timestamp.c (r1.174 -> r1.175)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c.diff?r1=1.174&r2=1.175)
pgsql/src/include/access:
xact.h (r1.85 -> r1.86)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xact.h.diff?r1=1.85&r2=1.86)
pgsql/src/include/utils:
timestamp.h (r1.67 -> r1.68)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/timestamp.h.diff?r1=1.67&r2=1.68)
pgsql/src/test/regress/expected:
stats.out (r1.10 -> r1.11)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/stats.out.diff?r1=1.10&r2=1.11)
pgsql/src/test/regress/sql:
stats.sql (r1.8 -> r1.9)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/stats.sql.diff?r1=1.8&r2=1.9)

Browse pgsql-committers by date

  From Date Subject
Next Message James William Pye 2007-04-30 03:36:23 python - be: Add a small comment to call_call and simplify a condition.
Previous Message James William Pye 2007-04-30 01:50:25 python - be: Use getattro instead of getattr.