mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +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:
@@ -6,7 +6,7 @@
|
||||
* for developers. If you edit any of these, be sure to do a *full*
|
||||
* rebuild (and an initdb if noted).
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.28 2008/02/29 20:58:33 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.29 2008/03/10 20:06:27 tgl Exp $
|
||||
*------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -27,8 +27,9 @@
|
||||
|
||||
/*
|
||||
* RELSEG_SIZE is the maximum number of blocks allowed in one disk
|
||||
* file. Thus, the maximum size of a single file is RELSEG_SIZE *
|
||||
* BLCKSZ; relations bigger than that are divided into multiple files.
|
||||
* file when USE_SEGMENTED_FILES is defined. Thus, the maximum size
|
||||
* of a single file is RELSEG_SIZE * BLCKSZ; relations bigger than that
|
||||
* are divided into multiple files.
|
||||
*
|
||||
* RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
|
||||
* This is often 2 GB or 4GB in a 32-bit operating system, unless you
|
||||
@@ -39,9 +40,16 @@
|
||||
* in the direction of a small limit. (Besides, a power-of-2 value
|
||||
* saves a few cycles in md.c.)
|
||||
*
|
||||
* When not using segmented files, RELSEG_SIZE is set to zero so that
|
||||
* this behavior can be distinguished in pg_control.
|
||||
*
|
||||
* Changing RELSEG_SIZE requires an initdb.
|
||||
*/
|
||||
#ifdef USE_SEGMENTED_FILES
|
||||
#define RELSEG_SIZE (0x40000000 / BLCKSZ)
|
||||
#else
|
||||
#define RELSEG_SIZE 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of a WAL file block. This need have no particular relation to BLCKSZ.
|
||||
|
Reference in New Issue
Block a user