From 3c6248a828af66db4c58247cd39e54583dff1d90 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 2 May 2008 01:08:27 +0000 Subject: Remove the recently added USE_SEGMENTED_FILES option, and indeed remove all support for a nonsegmented mode from md.c. Per recent discussions, there doesn't seem to be much value in a "never segment" option as opposed to segmenting with a suitably large segment size. So instead provide a configure-time switch to set the desired segment size in units of gigabytes. While at it, expose a configure switch for BLCKSZ as well. Zdenek Kotala --- doc/src/sgml/installation.sgml | 39 +++++++++++++++++++++++++++++++-------- doc/src/sgml/storage.sgml | 11 +++++------ 2 files changed, 36 insertions(+), 14 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 0fad43d701c..d0933bf7d19 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1,4 +1,4 @@ - + <![%standalone-include[<productname>PostgreSQL</>]]> @@ -1067,15 +1067,38 @@ su - postgres </varlistentry> <varlistentry> - <term><option>--disable-segmented-files</option></term> + <term><option>--with-segsize=<replaceable>SEGSIZE</replaceable></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. + Set the <firstterm>segment size</>, in gigabytes. Large tables are + divided into multiple operating-system files, each of size equal + to the segment size. This avoids problems with file size limits + that exist on many platforms. The default segment size, 1 gigabyte, + is safe on all supported platforms. If your operating system has + <quote>largefile</> support (which most do, nowadays), you can use + a larger segment size. This can be helpful to reduce the number of + file descriptors consumed when working with very large tables. + But be careful not to select a value larger than is supported + by your platform and the filesystem(s) you intend to use. Other + tools you might wish to use, such as <application>tar</>, could + also set limits on the usable file size. + It is recommended, though not absolutely required, that this value + be a power of 2. + Note that changing this value requires an initdb. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--with-blocksize=<replaceable>BLOCKSIZE</replaceable></option></term> + <listitem> + <para> + Set the <firstterm>block size</>, in kilobytes. This is the unit + of storage and I/O within tables. The default, 8 kilobytes, + is suitable for most situations; but other values may be useful + in special cases. + The value must be a power of 2 between 1 and 32 (kilobytes). + Note that changing this value requires an initdb. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml index 7ba0c1e343f..0303a2b3d4e 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.22 2008/03/10 20:06:27 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.23 2008/05/02 01:08:26 tgl Exp $ --> <chapter id="storage"> @@ -138,14 +138,13 @@ Avoid assuming that filenode and table OID are the same. </caution> <para> -When a table or index exceeds 1 GB, it is normally divided into gigabyte-sized +When a table or index exceeds 1 GB, it is 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.) +(Actually, 1 GB is just the default segment size. The segment size can be +adjusted using the configuration option <option>--with-segsize</option> +when building <productname>PostgreSQL</>.) The contents of tables and indexes are discussed further in <xref linkend="storage-page-layout">. </para> -- cgit v1.2.3