Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 170e331

Browse files
committed
Sigh ... pg_config.h.win32 needs to define BLCKSZ and RELSEG_SIZE now.
1 parent 3c6248a commit 170e331

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/include/pg_config.h.win32

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737
/* The alignment requirement of a `short'. */
3838
#define ALIGNOF_SHORT 2
3939

40+
/* Size of a disk block --- this also limits the size of a tuple. You can set
41+
it bigger if you need bigger tuples (although TOAST should reduce the need
42+
to have large tuples, since fields can be spread across multiple tuples).
43+
BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
44+
currently 2^15 (32768). This is determined by the 15-bit widths of the
45+
lp_off and lp_len fields in ItemIdData (see include/storage/itemid.h).
46+
Changing BLCKSZ requires an initdb. */
47+
#define BLCKSZ 8192
48+
4049
/* Define to the default TCP port number on which the server listens and to
4150
which clients will try to connect. This can be overridden at run-time, but
4251
it's convenient if your clients have the right default compiled in.
@@ -591,6 +600,19 @@
591600
your system. */
592601
/* #undef PTHREAD_CREATE_JOINABLE */
593602

603+
/* RELSEG_SIZE is the maximum number of blocks allowed in one disk file. Thus,
604+
the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations bigger
605+
than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must be
606+
less than your OS' limit on file size. This is often 2 GB or 4GB in a
607+
32-bit operating system, unless you have large file support enabled. By
608+
default, we make the limit 1 GB to avoid any possible integer-overflow
609+
problems within the OS. A limit smaller than necessary only means we divide
610+
a large relation into more chunks than necessary, so it seems best to err
611+
in the direction of a small limit. A power-of-2 value is recommended to
612+
save a few cycles in md.c, but is not absolutely required. Changing
613+
RELSEG_SIZE requires an initdb. */
614+
#define RELSEG_SIZE 131072
615+
594616
/* The size of a `size_t', as computed by sizeof. */
595617
#define SIZEOF_SIZE_T 4
596618

0 commit comments

Comments
 (0)