aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/postinit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-08-06 04:40:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-08-06 04:40:08 +0000
commitc3e2a951b496f8030442f157b201cbddab5b5662 (patch)
tree0c58ce0f0e6c5c6d90d110bbc6b47c71b2bc66d3 /src/backend/utils/init/postinit.c
parent8ae23135bc60df9104b4b8aa1171a7b9b89f4926 (diff)
downloadpostgresql-c3e2a951b496f8030442f157b201cbddab5b5662.tar.gz
postgresql-c3e2a951b496f8030442f157b201cbddab5b5662.zip
Toast all the system-table columns that seem to need it. It turns out
that giving pg_proc a toast table required solving the same problems we'd have to solve for pg_class --- pg_proc is one of the relations that gets bootstrapped in relcache.c. Solution is to go back at the end of initialization and read in the *real* pg_class row to replace the phony entry created by formrdesc(). This should work as long as there's no need to touch any toasted values during initialization, which seems a reasonable assumption. Although I did not add a toast-table for every single system table with a varlena attribute, I believe that it would work to just do ALTER TABLE pg_class CREATE TOAST TABLE. So anyone who's really intent on having several thousand ACL entries for a rel could do it. NOTE: I didn't force initdb, but you must do one to see the effects of this patch.
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r--src/backend/utils/init/postinit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index ba0e2dd97af..f63590cdb98 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.63 2000/07/08 03:04:16 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.64 2000/08/06 04:39:10 tgl Exp $
*
*
*-------------------------------------------------------------------------
@@ -313,7 +313,8 @@ InitPostgres(const char *dbname)
* it to examine AMI transaction status, and this is never written
* after initdb is done. -mer 15 June 1992
*/
- RelationInitialize(); /* pre-allocated reldescs created here */
+ RelationCacheInitialize(); /* pre-allocated reldescs created here */
+
InitializeTransactionSystem(); /* pg_log,etc init/crash recovery
* here */
@@ -362,6 +363,9 @@ InitPostgres(const char *dbname)
if (!bootstrap)
StartTransactionCommand();
+ /* replace faked-up relcache entries with the real info */
+ RelationCacheInitializePhase2();
+
/*
* Set ourselves to the proper user id and figure out our postgres
* user id. If we ever add security so that we check for valid