类型: | integer |
默认: | 0 |
最低限度: | 0 |
最大: | 262143 |
上下文: | postmaster |
重新开始: | true |
设置可以同时处于prepared状态的事务的最大数目(见sql-prepare-transaction)。把这个参数设置 为零(这是默认设置)将禁用预备事务特性。这个参数只能在服务器启动时设置。
如果你不打算使用预备事务,可以把这个参数设置为零来防止意外创建预备事务。如果你正在使用预备事务,你将希望把max_prepared_transactions
至少设置为max_connections一样大,因此每一个会话可以有一个预备事务待处理。
当运行一个后备服务器时,这个参数必须至少与主服务器上的一样大。否则,后备服务器上将不会执行查询。
建议 [EN]
Most applications do not use XA prepared transactions, so should set this parameter to 0. If you do require prepared transactions, you should set this equal to max_connections to avoid blocking. May require increasing kernel memory parameters.
在 StackOverflow
在 pgsql-hackers
- Re: Fix the description of GUC "max_locks_per_transaction" and "max_pred_locks_per_transaction" in guc_table.c
- Re: HOT chain validation in verify_heapam()
- RE: Fix the description of GUC "max_locks_per_transaction" and "max_pred_locks_per_transaction" in guc_table.c
- Re: Possibility to disable `ALTER SYSTEM`
- Re: explain_regress, explain(MACHINE), and default to explain(BUFFERS) (was: BUFFERS enabled by default in EXPLAIN (ANALYZE))