Type: | integer |
Default: | 0 |
Min: | 0 |
Max: | 262143 |
Context: | postmaster |
Restart: | true |
Sets the maximum number of transactions that can be in the prepared state simultaneously (see sql-prepare-transaction). Setting this parameter to zero (which is the default) disables the prepared-transaction feature. This parameter can only be set at server start.
If you are not planning to use prepared transactions, this parameter should be set to zero to prevent accidental creation of prepared transactions. If you are using prepared transactions, you will probably want max_prepared_transactions
to be at least as large as max_connections, so that every session can have a prepared transaction pending.
When running a standby server, you must set this parameter to the same or higher value than on the primary server. Otherwise, queries will not be allowed in the standby server.
Recommendations
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: Possibility to disable `ALTER SYSTEM`