1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Change the bootstrap sequence so that toast tables for system catalogs are

created in the bootstrap phase proper, rather than added after-the-fact
by initdb.  This is cleaner than before because it allows us to retire the
undocumented ALTER TABLE ... CREATE TOAST TABLE command, but the real reason
I'm doing it is so that toast tables of shared catalogs will now have
predetermined OIDs.  This will allow a reasonably clean solution to the
problem of locking tables before we load their relcache entries, to appear
in a forthcoming patch.
This commit is contained in:
Tom Lane
2006-07-31 01:16:38 +00:00
parent 638860ce35
commit 6e38e34d64
26 changed files with 529 additions and 406 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.17 2006/03/10 19:10:46 momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/bki.sgml,v 1.18 2006/07/31 01:16:36 tgl Exp $ -->
<chapter id="bki">
<title><acronym>BKI</acronym> Backend Interface</title>
@ -209,6 +209,28 @@
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>declare toast</>
<replaceable class="parameter">toasttableoid</replaceable>
<replaceable class="parameter">toastindexoid</replaceable>
<literal>on</> <replaceable class="parameter">tablename</replaceable>
</term>
<listitem>
<para>
Create a TOAST table for the table named
<replaceable class="parameter">tablename</replaceable>.
The TOAST table is assigned OID
<replaceable class="parameter">toasttableoid</replaceable>
and its index is assigned OID
<replaceable class="parameter">toastindexoid</replaceable>.
As with <literal>declare index</>, filling of the index
is postponed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>build indices</></term>
@ -235,6 +257,12 @@
the created table for data insertion.
</para>
<para>
Also, the <literal>declare index</> and <literal>declare toast</>
commands cannot be used until the system catalogs they need have been
created and filled in.
</para>
<para>
Thus, the structure of the <filename>postgres.bki</filename> file has to
be:
@ -286,7 +314,7 @@
</listitem>
<listitem>
<para>
Define indexes.
Define indexes and toast tables.
</para>
</listitem>
<listitem>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/keywords.sgml,v 2.16 2005/10/12 09:45:29 petere Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/keywords.sgml,v 2.17 2006/07/31 01:16:36 tgl Exp $ -->
<appendix id="sql-keywords-appendix">
<title><acronym>SQL</acronym> Key Words</title>
@ -4013,13 +4013,6 @@
<entry>reserved</entry>
<entry>reserved</entry>
</row>
<row>
<entry><token>TOAST</token></entry>
<entry>non-reserved</entry>
<entry></entry>
<entry></entry>
<entry></entry>
</row>
<row>
<entry><token>TOP_LEVEL_COUNT</token></entry>
<entry></entry>