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

pgsql: Arrange to cache fmgr lookup information for an index's access

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Arrange to cache fmgr lookup information for an index's access
Date: 2005-05-27 23:31:21
Message-ID: 20050527233121.CF9D252868@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Arrange to cache fmgr lookup information for an index's access method
routines in the index's relcache entry, instead of doing a fresh fmgr_info
on every index access.  We were already doing this for the index's opclass
support functions; not sure why we didn't think to do it for the AM
functions too.  This supersedes the former method of caching (only)
amgettuple in indexscan scan descriptors; it's an improvement because the
function lookup can be amortized across multiple statements instead of
being repeated for each statement.  Even though lookup for builtin
functions is pretty cheap, this seems to drop a percent or two off some
simple benchmarks.

Modified Files:
--------------
    pgsql/src/backend/access/index:
        genam.c (r1.47 -> r1.48)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/genam.c.diff?r1=1.47&r2=1.48)
        indexam.c (r1.81 -> r1.82)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/indexam.c.diff?r1=1.81&r2=1.82)
    pgsql/src/backend/utils/cache:
        relcache.c (r1.223 -> r1.224)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/relcache.c.diff?r1=1.223&r2=1.224)
    pgsql/src/include/access:
        genam.h (r1.50 -> r1.51)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/genam.h.diff?r1=1.50&r2=1.51)
        relscan.h (r1.38 -> r1.39)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/relscan.h.diff?r1=1.38&r2=1.39)
    pgsql/src/include/utils:
        rel.h (r1.83 -> r1.84)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/rel.h.diff?r1=1.83&r2=1.84)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2005-05-28 04:12:13
Subject: pgsql: Remove: < < * Add XML output to pg_dump and COPY < < We
Previous:From: Bruce MomjianDate: 2005-05-27 22:10:21
Subject: pgsql: Update Farsi FAQ.

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