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

Provide a build-time option to store large relations as single files, rather

than dividing them into 1GB segments as has been our longtime practice.  This
requires working support for large files in the operating system; at least for
the time being, it won't be the default.

Zdenek Kotala
This commit is contained in:
Tom Lane
2008-03-10 20:06:27 +00:00
parent b6912af22b
commit f0828b2fc3
12 changed files with 595 additions and 100 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.303 2008/03/06 21:37:33 momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.304 2008/03/10 20:06:27 tgl Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@ -1025,6 +1025,20 @@ su - postgres
</listitem>
</varlistentry>
<varlistentry>
<term><option>--disable-segmented-files</option></term>
<listitem>
<para>
Store large tables as single operating-system files, rather than
dividing them into 1GB segments as is the default. This option
is ignored unless the operating system has <quote>largefile</>
support (which most do, nowadays). It can be helpful to reduce
the number of file descriptors consumed when working with very
large tables.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--disable-spinlocks</option></term>
<listitem>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.21 2007/11/23 00:24:12 ishii Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.22 2008/03/10 20:06:27 tgl Exp $ -->
<chapter id="storage">
@ -138,10 +138,14 @@ Avoid assuming that filenode and table OID are the same.
</caution>
<para>
When a table or index exceeds 1 GB, it is divided into gigabyte-sized
When a table or index exceeds 1 GB, it is normally divided into gigabyte-sized
<firstterm>segments</>. The first segment's file name is the same as the
filenode; subsequent segments are named filenode.1, filenode.2, etc.
This arrangement avoids problems on platforms that have file size limitations.
(But if the platform does not have such a limitation, and
<option>--disable-segmented-files</option> was specified when
<productname>PostgreSQL</> was built, then each table or index is stored
as a single file, without segmentation.)
The contents of tables and indexes are discussed further in
<xref linkend="storage-page-layout">.
</para>