diff options
| author | Tom Lane | 2000-08-06 04:40:08 +0000 |
|---|---|---|
| committer | Tom Lane | 2000-08-06 04:40:08 +0000 |
| commit | c3e2a951b496f8030442f157b201cbddab5b5662 (patch) | |
| tree | 0c58ce0f0e6c5c6d90d110bbc6b47c71b2bc66d3 /src/bin | |
| parent | 8ae23135bc60df9104b4b8aa1171a7b9b89f4926 (diff) | |
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/bin')
| -rw-r--r-- | src/bin/initdb/initdb.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh index 8fbc8c68260..6a23e7a72dc 100644 --- a/src/bin/initdb/initdb.sh +++ b/src/bin/initdb/initdb.sh @@ -23,7 +23,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.101 2000/07/06 21:33:38 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.102 2000/08/06 04:39:22 tgl Exp $ # #------------------------------------------------------------------------- @@ -519,9 +519,19 @@ if [ "$PwPrompt" ]; then fi -echo "Enabling unlimited storage for pg_rewrite" +echo "Enabling unlimited row width for system tables." +echo "ALTER TABLE pg_attrdef CREATE TOAST TABLE" \ + | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely +echo "ALTER TABLE pg_description CREATE TOAST TABLE" \ + | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely +echo "ALTER TABLE pg_proc CREATE TOAST TABLE" \ + | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely +echo "ALTER TABLE pg_relcheck CREATE TOAST TABLE" \ + | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely echo "ALTER TABLE pg_rewrite CREATE TOAST TABLE" \ | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely +echo "ALTER TABLE pg_statistic CREATE TOAST TABLE" \ + | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely echo "Creating view pg_user." |
