Skip site navigation (1) Skip section navigation (2)

pgsql: Improve management of "sticky" entries incontrib/pg_stat_statem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve management of "sticky" entries incontrib/pg_stat_statem
Date: 2012-04-08 19:50:25
Message-ID: E1SGy81-00061S-Mm@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Improve management of "sticky" entries in contrib/pg_stat_statements.

This patch addresses a deficiency in the previous pg_stat_statements patch.
We want to give sticky entries an initial "usage" factor high enough that
they probably will stick around until their query is completed.  However,
if the query never completes (eg it gets an error during execution), the
entry shouldn't persist indefinitely.  Manage this by starting out with
a usage setting equal to the (approximate) median usage value within the
whole hashtable, but decaying the value much more aggressively than we
do for normal entries.

Peter Geoghegan

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d5375491f8e391224b48e4bb449995a4642183ea

Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c |   57 +++++++++++++++++------
1 files changed, 42 insertions(+), 15 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2012-04-09 03:06:38
Subject: pgsql: Teach SLRU code to avoid replacing I/O-busy pages.
Previous:From: Heikki LinnakangasDate: 2012-04-08 16:44:38
Subject: pgsql: set_stack_base() no longer needs to be called in PostgresMain.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group