From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Allow backends to start up without use of the flat-file copy of |
Date: | 2009-08-12 20:53:31 |
Message-ID: | 20090812205331.1871075331E@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Allow backends to start up without use of the flat-file copy of pg_database.
To make this work in the base case, pg_database now has a nailed-in-cache
relation descriptor that is initialized using hardwired knowledge in
relcache.c. This means pg_database is added to the set of relations that
need to have a Schema_pg_xxx macro maintained in pg_attribute.h. When this
path is taken, we'll have to do a seqscan of pg_database to find the row
we need.
In the normal case, we are able to do an indexscan to find the database's row
by name. This is made possible by storing a global relcache init file that
describes only the shared catalogs and their indexes (and therefore is usable
by all backends in any database). A new backend loads this cache file,
finds its database OID after an indexscan on pg_database, and then loads
the local relcache init file for that database.
This change should effectively eliminate number of databases as a factor
in backend startup time, even with large numbers of databases. However,
the real reason for doing it is as a first step towards getting rid of
the flat files altogether. There are still several other sub-projects
to be tackled before that can happen.
Modified Files:
--------------
pgsql/src/backend/access/transam:
xlog.c (r1.347 -> r1.348)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.347&r2=1.348)
pgsql/src/backend/postmaster:
autovacuum.c (r1.100 -> r1.101)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/autovacuum.c?r1=1.100&r2=1.101)
pgstat.c (r1.189 -> r1.190)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c?r1=1.189&r2=1.190)
pgsql/src/backend/storage/lmgr:
proc.c (r1.207 -> r1.208)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/proc.c?r1=1.207&r2=1.208)
pgsql/src/backend/utils/cache:
relcache.c (r1.288 -> r1.289)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/relcache.c?r1=1.288&r2=1.289)
pgsql/src/backend/utils/init:
flatfiles.c (r1.36 -> r1.37)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/flatfiles.c?r1=1.36&r2=1.37)
miscinit.c (r1.175 -> r1.176)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/miscinit.c?r1=1.175&r2=1.176)
postinit.c (r1.193 -> r1.194)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/postinit.c?r1=1.193&r2=1.194)
pgsql/src/include/catalog:
pg_attribute.h (r1.151 -> r1.152)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_attribute.h?r1=1.151&r2=1.152)
pg_type.h (r1.207 -> r1.208)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_type.h?r1=1.207&r2=1.208)
pgsql/src/include:
miscadmin.h (r1.211 -> r1.212)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/miscadmin.h?r1=1.211&r2=1.212)
pgsql/src/include/storage:
proc.h (r1.112 -> r1.113)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/proc.h?r1=1.112&r2=1.113)
pgsql/src/include/utils:
relcache.h (r1.63 -> r1.64)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/relcache.h?r1=1.63&r2=1.64)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-12 21:03:52 | pgsql: The html-stamp and man-stamp files also need to be cvsignore'd. |
Previous Message | Tom Lane | 2009-08-12 18:24:03 | pgsql: Fix old bug in log_autovacuum_min_duration code: it was relying |