mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add unchangeable GUC "variables" segment_size, wal_block_size, and
wal_segment_size to make those configuration parameters available to clients, in the same way that block_size was previously exposed. Bernd Helmle, with comments from Abhijit Menon-Sen and some further tweaking by me.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.463 2008/07/08 02:07:29 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.464 2008/07/10 22:08:17 tgl Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -377,6 +377,9 @@ static int max_function_args;
|
||||
static int max_index_keys;
|
||||
static int max_identifier_length;
|
||||
static int block_size;
|
||||
static int segment_size;
|
||||
static int wal_block_size;
|
||||
static int wal_segment_size;
|
||||
static bool integer_datetimes;
|
||||
|
||||
/* should be static, but commands/variable.c needs to get at these */
|
||||
@ -1753,6 +1756,39 @@ static struct config_int ConfigureNamesInt[] =
|
||||
BLCKSZ, BLCKSZ, BLCKSZ, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"segment_size", PGC_INTERNAL, PRESET_OPTIONS,
|
||||
gettext_noop("Shows the number of pages per disk file."),
|
||||
NULL,
|
||||
GUC_UNIT_BLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
|
||||
},
|
||||
&segment_size,
|
||||
RELSEG_SIZE, RELSEG_SIZE, RELSEG_SIZE, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"wal_block_size", PGC_INTERNAL, PRESET_OPTIONS,
|
||||
gettext_noop("Shows the block size in the write ahead log."),
|
||||
NULL,
|
||||
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
|
||||
},
|
||||
&wal_block_size,
|
||||
XLOG_BLCKSZ, XLOG_BLCKSZ, XLOG_BLCKSZ, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"wal_segment_size", PGC_INTERNAL, PRESET_OPTIONS,
|
||||
gettext_noop("Shows the number of pages per write ahead log segment."),
|
||||
NULL,
|
||||
GUC_UNIT_XBLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
|
||||
},
|
||||
&wal_segment_size,
|
||||
(XLOG_SEG_SIZE / XLOG_BLCKSZ),
|
||||
(XLOG_SEG_SIZE / XLOG_BLCKSZ),
|
||||
(XLOG_SEG_SIZE / XLOG_BLCKSZ),
|
||||
NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"autovacuum_naptime", PGC_SIGHUP, AUTOVACUUM,
|
||||
gettext_noop("Time to sleep between autovacuum runs."),
|
||||
|
Reference in New Issue
Block a user