Reduce default value of max_prepared_transactions from 50 to 5. This
saves nearly 700kB in the default shared memory segment size, which seems worthwhile, and it is a feature that many users won't use anyway. Per Heikki's argument, there is no point in a compromise value --- those who are using 2PC at all will probably want it at least equal to max_connections. But we can't set it to zero by default without breaking the prepared_xacts regression test.
This commit is contained in:
parent
8aec77fb9f
commit
037709e0b3
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.348 2005/08/24 18:56:07 tgl Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.349 2005/08/29 21:38:17 tgl Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter Id="runtime">
|
<chapter Id="runtime">
|
||||||
@ -1179,7 +1179,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
endterm="sql-prepare-transaction-title">).
|
endterm="sql-prepare-transaction-title">).
|
||||||
Setting this parameter to zero disables the prepared-transaction
|
Setting this parameter to zero disables the prepared-transaction
|
||||||
feature.
|
feature.
|
||||||
The default is 50.
|
The default is 5.
|
||||||
This option can only be set at server start.
|
This option can only be set at server start.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.10 2005/08/20 23:26:10 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.11 2005/08/29 21:38:18 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Each global transaction is associated with a global transaction
|
* Each global transaction is associated with a global transaction
|
||||||
@ -64,7 +64,7 @@
|
|||||||
#define TWOPHASE_DIR "pg_twophase"
|
#define TWOPHASE_DIR "pg_twophase"
|
||||||
|
|
||||||
/* GUC variable, can't be changed after startup */
|
/* GUC variable, can't be changed after startup */
|
||||||
int max_prepared_xacts = 50;
|
int max_prepared_xacts = 5;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This struct describes one global transaction that is in prepared state
|
* This struct describes one global transaction that is in prepared state
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.286 2005/08/22 17:34:59 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.287 2005/08/29 21:38:18 tgl Exp $
|
||||||
*
|
*
|
||||||
*--------------------------------------------------------------------
|
*--------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1203,7 +1203,7 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
&max_prepared_xacts,
|
&max_prepared_xacts,
|
||||||
50, 0, INT_MAX, NULL, NULL
|
5, 0, INT_MAX, NULL, NULL
|
||||||
},
|
},
|
||||||
|
|
||||||
#ifdef LOCK_DEBUG
|
#ifdef LOCK_DEBUG
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
#shared_buffers = 1000 # min 16 or max_connections*2, 8KB each
|
#shared_buffers = 1000 # min 16 or max_connections*2, 8KB each
|
||||||
#temp_buffers = 1000 # min 100, 8KB each
|
#temp_buffers = 1000 # min 100, 8KB each
|
||||||
#max_prepared_transactions = 50 # can be 0 or more
|
#max_prepared_transactions = 5 # can be 0 or more
|
||||||
#work_mem = 1024 # min 64, size in KB
|
#work_mem = 1024 # min 64, size in KB
|
||||||
#maintenance_work_mem = 16384 # min 1024, size in KB
|
#maintenance_work_mem = 16384 # min 1024, size in KB
|
||||||
#max_stack_depth = 2048 # min 100, size in KB
|
#max_stack_depth = 2048 # min 100, size in KB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user