Thread: pgsql: Create a syscache for pg_database-indexed-by-oid, and make use of

pgsql: Create a syscache for pg_database-indexed-by-oid, and make use of

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Create a syscache for pg_database-indexed-by-oid, and make use of it
in various places that were previously doing ad hoc pg_database searches.
This may speed up database-related privilege checks a little bit, but
the main motivation is to eliminate the performance reason for having
ReverifyMyDatabase do such a lot of stuff (viz, avoiding repeat scans
of pg_database during backend startup).  The locking reason for having
that routine is about to go away, and it'd be good to have the option
to break it up.

Modified Files:
--------------
    pgsql/src/backend/catalog:
        aclchk.c (r1.127 -> r1.128)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/aclchk.c.diff?r1=1.127&r2=1.128)
    pgsql/src/backend/commands:
        dbcommands.c (r1.179 -> r1.180)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c.diff?r1=1.179&r2=1.180)
        vacuum.c (r1.328 -> r1.329)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c.diff?r1=1.328&r2=1.329)
    pgsql/src/backend/postmaster:
        autovacuum.c (r1.17 -> r1.18)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/autovacuum.c.diff?r1=1.17&r2=1.18)
    pgsql/src/backend/utils/cache:
        syscache.c (r1.102 -> r1.103)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/syscache.c.diff?r1=1.102&r2=1.103)
    pgsql/src/backend/utils/init:
        postinit.c (r1.164 -> r1.165)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/postinit.c.diff?r1=1.164&r2=1.165)
    pgsql/src/include/utils:
        acl.h (r1.95 -> r1.96)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/acl.h.diff?r1=1.95&r2=1.96)
        syscache.h (r1.62 -> r1.63)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/syscache.h.diff?r1=1.62&r2=1.63)