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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: cb98e6fb8fd4f1ca955a85d5c0088e42e77a04f0
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-05-03T22:45:26Z
Releases: 8.2.0
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.

Files