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

pgsql: Adjust pgstat_initstats() to avoid repeated searches of the

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Adjust pgstat_initstats() to avoid repeated searches of the
Date: 2007-04-21 04:10:53
Message-ID: 20070421041053.A5B279FA495@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Adjust pgstat_initstats() to avoid repeated searches of the TabStat arrays
when a relation is opened multiple times in the same transaction.  This is
particularly useful for system catalogs, which we may heap_open or index_open
many times in a transaction, and it doesn't really cost anything extra even
if the rel is touched but once.  Motivated by study of an example from Greg
Stark, in which pgstat_initstats() accounted for an unreasonably large
fraction of the runtime.

Modified Files:
--------------
    pgsql/src/backend/postmaster:
        pgstat.c (r1.152 -> r1.153)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.152&r2=1.153)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-04-21 04:49:20
Subject: pgsql: Improve the way in which CatalogCacheComputeHashValue combines
Previous:From: Tom LaneDate: 2007-04-21 02:41:13
Subject: pgsql: Tweak set_rel_width() to avoid redundant executions of

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