1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Revert 56-bit relfilenode change and follow-up commits.

There are still some alignment-related failures in the buildfarm,
which might or might not be able to be fixed quickly, but I've also
just realized that it increased the size of many WAL records by 4 bytes
because a block reference contains a RelFileLocator. The effect of that
hasn't been studied or discussed, so revert for now.
This commit is contained in:
Robert Haas
2022-09-28 09:45:27 -04:00
parent 6af0827232
commit a448e49bcb
73 changed files with 304 additions and 719 deletions

View File

@ -1984,7 +1984,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>relfilenode</structfield> <type>int8</type>
<structfield>relfilenode</structfield> <type>oid</type>
</para>
<para>
Name of the on-disk file of this relation; zero means this

View File

@ -25210,11 +25210,6 @@ SELECT collation for ('foo' COLLATE "de_DE");
<entry><type>timestamp with time zone</type></entry>
</row>
<row>
<entry><structfield>next_relfilenumber</structfield></entry>
<entry><type>timestamp with time zone</type></entry>
</row>
</tbody>
</tgroup>
</table>

View File

@ -62,7 +62,7 @@
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>relfilenode</structfield> <type>int8</type>
<structfield>relfilenode</structfield> <type>oid</type>
(references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relfilenode</structfield>)
</para>
<para>

View File

@ -217,12 +217,11 @@ with the suffix <literal>_init</literal> (see <xref linkend="storage-init"/>).
<caution>
<para>
Note that a table's filenode will normally be different than the OID. For
system tables, the initial filenode will be equal to the table OID, but it will
be different if the table has ever been subjected to a rewriting operation,
such as <command>TRUNCATE</command>, <command>REINDEX</command>,
<command>CLUSTER</command> or some forms of <command>ALTER TABLE</command>.
For user tables, even the initial filenode will be different than the table OID.
Note that while a table's filenode often matches its OID, this is
<emphasis>not</emphasis> necessarily the case; some operations, like
<command>TRUNCATE</command>, <command>REINDEX</command>, <command>CLUSTER</command> and some forms
of <command>ALTER TABLE</command>, can change the filenode while preserving the OID.
Avoid assuming that filenode and table OID are the same.
Also, for certain system catalogs including <structname>pg_class</structname> itself,
<structname>pg_class</structname>.<structfield>relfilenode</structfield> contains zero. The
actual filenode number of these catalogs is stored in a lower-level data