- The default maximum segment size is 32 MB, and the
+ The default maximum segment size is 32MB, and the
default maximum total size is 2097152
pages. A page is almost always 4096 bytes except in unusual
kernel configurations with huge pages
The shared memory size settings can be changed via the
- sysctl interface. For example, to allow 16 GB:
+ sysctl interface. For example, to allow 16GB:
$ sysctl -w kernel.shmmax=17179869184
$ sysctl -w kernel.shmall=4194304
- SHMALL> is measured in 4 kB pages on this platform.
+ SHMALL> is measured in 4kB pages on this platform.
- In the default configuration, only 512 kB of shared memory per
+ In the default configuration, only 512kB of shared memory per
segment is allowed. To increase the setting, first change to the
directory /etc/conf/cf.d>. To display the current value of
SHMMAX>, run:
On
UnixWare> 7, the maximum size for shared
- memory segments is 512 kB in the default configuration.
+ memory segments is 512kB in the default configuration.
To display the current value of SHMMAX>, run:
/etc/conf/bin/idtune -g SHMMAX
-When a table or index exceeds 1 GB, it is divided into gigabyte-sized
+When a table or index exceeds 1GB, it is divided into gigabyte-sized
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.
-(Actually, 1 GB is just the default segment size. The segment size can be
+(Actually, 1GB is just the default segment size. The segment size can be
adjusted using the configuration option
when building
PostgreSQL>.)
In principle, free space map and visibility map forks could require multiple
PostgreSQL uses a fixed page size (commonly
-8 kB), and does not allow tuples to span multiple pages. Therefore, it is
+8kB), and does not allow tuples to span multiple pages. Therefore, it is
not possible to store very large field values directly. To overcome
this limitation, large field values are compressed and/or broken up into
multiple physical rows. This happens transparently to the user, with only
TOAST> usurps two bits of the varlena length word (the high-order
bits on big-endian machines, the low-order bits on little-endian machines),
thereby limiting the logical size of any value of a
TOAST>-able
-data type to 1 GB (230> - 1 bytes). When both bits are zero,
+data type to 1GB (230> - 1 bytes). When both bits are zero,
the value is an ordinary un-
TOAST>ed value of the data type, and
the remaining bits of the length word give the total datum size (including
length word) in bytes. When the highest-order or lowest-order bit is set,
header, and the remaining bits of that byte give the total datum size
(including length byte) in bytes. This alternative supports space-efficient
storage of values shorter than 127 bytes, while still allowing the data type
-to grow to 1 GB at need. Values with single-byte headers aren't aligned on
+to grow to 1GB at need. Values with single-byte headers aren't aligned on
any particular boundary, whereas values with four-byte headers are aligned on
at least a four-byte boundary; this omission of alignment padding provides
additional space savings that is significant compared to short values.
The
TOAST> management code is triggered only
when a row value to be stored in a table is wider than
-TOAST_TUPLE_THRESHOLD> bytes (normally 2 kB).
+TOAST_TUPLE_THRESHOLD> bytes (normally 2kB).
The
TOAST> code will compress and/or move
field values out-of-line until the row value is shorter than
-TOAST_TUPLE_TARGET> bytes (also normally 2 kB)
+TOAST_TUPLE_TARGET> bytes (also normally 2kB)
or no more gains can be had. During an UPDATE
operation, values of unchanged fields are normally preserved as-is; so an
UPDATE of a row with out-of-line values incurs no
TOAST> costs if
raw data size including the
TOAST> table, and that the main table
contained only about 10% of the entire data (the URLs and some small HTML
pages). There was no run time difference compared to an un-
TOAST>ed
-comparison table, in which all the HTML pages were cut down to 7 kB to fit.
+comparison table, in which all the HTML pages were cut down to 7kB to fit.
Indirect
TOAST> pointers simply point at a non-indirect varlena
value stored somewhere in memory. This case was originally created merely
as a proof of concept, but it is currently used during logical decoding to
-avoid possibly having to create physical tuples exceeding 1 GB (as pulling
+avoid possibly having to create physical tuples exceeding 1GB (as pulling
all out-of-line field values into the tuple might do). The case is of
limited use since the creator of the pointer datum is entirely responsible
that the referenced data survives for as long as the pointer could exist,
Every table and index is stored as an array of pages> of a
-fixed size (usually 8 kB, although a different page size can be selected
+fixed size (usually 8kB, although a different page size can be selected
when compiling the server). In a table, all the pages are logically
equivalent, so a particular item (row) can be stored in any page. In
indexes, the first page is generally reserved as a metapage>
linkend="guc-checkpoint-timeout"> seconds, or if
is about to be exceeded,
whichever comes first.
- The default settings are 5 minutes and 1 GB, respectively.
+ The default settings are 5 minutes and 1GB, respectively.
If no WAL has been written since the previous checkpoint, new checkpoints
will be skipped even if checkpoint_timeout> has passed.
(If WAL archiving is being used and you want to put a lower limit on how
WAL logs are stored in the directory
pg_xlog under the data directory, as a set of
- segment files, normally each 16 MB in size (but the size can be changed
+ segment files, normally each 16MB in size (but the size can be changed
by altering the
building the server). Each segment is divided into pages, normally
- 8 kB each (this size can be changed via the
+ 8kB each (this size can be changed via the
configure option). The log record headers are described in
access/xlogrecord.h; the record content is dependent
on the type of event that is being logged. Segment files are given