mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Define a separately configurable XLOG_BLCKSZ symbol for the page size
used within WAL files. Historically this was the same as the data file BLCKSZ, but there's no necessary connection, and it's possible that performance gains might ensue from reducing XLOG_BLCKSZ. In any case distinguishing two symbols should improve code clarity. This commit does not actually change the page size, only provide the infrastructure to make it possible to do so. initdb forced because of addition of a field to pg_control. Mark Wong, with some help from Simon Riggs and Tom Lane.
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.20 2006/01/05 03:01:37 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.21 2006/04/03 23:35:05 tgl Exp $
|
||||
*------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -43,9 +43,20 @@
|
||||
*/
|
||||
#define RELSEG_SIZE (0x40000000 / BLCKSZ)
|
||||
|
||||
/*
|
||||
* Size of a WAL file block. This need have no particular relation to BLCKSZ.
|
||||
* XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O,
|
||||
* XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O
|
||||
* buffers, else direct I/O may fail.
|
||||
*
|
||||
* Changing XLOG_BLCKSZ requires an initdb.
|
||||
*/
|
||||
#define XLOG_BLCKSZ 8192
|
||||
|
||||
/*
|
||||
* XLOG_SEG_SIZE is the size of a single WAL file. This must be a power of 2
|
||||
* and larger than BLCKSZ (preferably, a great deal larger than BLCKSZ).
|
||||
* and larger than XLOG_BLCKSZ (preferably, a great deal larger than
|
||||
* XLOG_BLCKSZ).
|
||||
*
|
||||
* Changing XLOG_SEG_SIZE requires an initdb.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user