タイプ: | integer |
デフォルト: | 0 |
分: | 0 |
最大: | 262143 |
コンテキスト: | postmaster |
再起動: | true |
同時にプリペアド状態にできるトランザクションの最大数を設定します(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.
On StackOverflow
On 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: 012_subtransactions.pl vs clang -fsanitize=undefined
- Re: explain_regress, explain(MACHINE), and default to explain(BUFFERS) (was: BUFFERS enabled by default in EXPLAIN (ANALYZE))