aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-08-13 20:10:54 +0000
committerRobert Haas <rhaas@postgresql.org>2010-08-13 20:10:54 +0000
commitdebcec7dc31a992703911a9953e299c8d730c778 (patch)
treedad0d10ec39eafe0cc254c17e36eb82ec822cdac /doc/src
parent3f9479ef3fdf49fc22088be5268fa536cf5d4efd (diff)
downloadpostgresql-debcec7dc31a992703911a9953e299c8d730c778.tar.gz
postgresql-debcec7dc31a992703911a9953e299c8d730c778.zip
Include the backend ID in the relpath of temporary relations.
This allows us to reliably remove all leftover temporary relation files on cluster startup without reference to system catalogs or WAL; therefore, we no longer include temporary relations in XLOG_XACT_COMMIT and XLOG_XACT_ABORT WAL records. Since these changes require including a backend ID in each SharedInvalSmgrMsg, the size of the SharedInvalidationMessage.id field has been reduced from two bytes to one, and the maximum number of connections has been reduced from INT_MAX / 4 to 2^23-1. It would be possible to remove these restrictions by increasing the size of SharedInvalidationMessage by 4 bytes, but right now that doesn't seem like a good trade-off. Review by Jaime Casanova and Tom Lane.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/storage.sgml26
1 files changed, 15 insertions, 11 deletions
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index c4b38ddb6c8..46bb03432da 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.32 2010/02/16 22:34:43 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.33 2010/08/13 20:10:50 rhaas Exp $ -->
<chapter id="storage">
@@ -133,16 +133,20 @@ there.
</para>
<para>
-Each table and index is stored in a separate file, named after the table
-or index's <firstterm>filenode</> number, which can be found in
-<structname>pg_class</>.<structfield>relfilenode</>. In addition to the
-main file (a/k/a main fork), each table and index has a <firstterm>free space
-map</> (see <xref linkend="storage-fsm">), which stores information about free
-space available in the relation. The free space map is stored in a file named
-with the filenode number plus the suffix <literal>_fsm</>. Tables also have a
-<firstterm>visibility map</>, stored in a fork with the suffix
-<literal>_vm</>, to track which pages are known to have no dead tuples.
-The visibility map is described further in <xref linkend="storage-vm">.
+Each table and index is stored in a separate file. For ordinary relations,
+these files are named after the table or index's <firstterm>filenode</> number,
+which can be found in <structname>pg_class</>.<structfield>relfilenode</>. But
+for temporary relations, the file name is of the form
+<literal>t<replaceable>BBB</>_<replaceable>FFF</></>, where <replaceable>BBB</>
+is the backend ID of the backend which created the file, and <replaceable>FFF</>
+is the filenode number. In either case, in addition to the main file (a/k/a
+main fork), each table and index has a <firstterm>free space map</> (see <xref
+linkend="storage-fsm">), which stores information about free space available in
+the relation. The free space map is stored in a file named with the filenode
+number plus the suffix <literal>_fsm</>. Tables also have a
+<firstterm>visibility map</>, stored in a fork with the suffix <literal>_vm</>,
+to track which pages are known to have no dead tuples. The visibility map is
+described further in <xref linkend="storage-vm">.
</para>
<caution>