PostgreSQL version:

default_transaction_deferrable

When running at the serializable isolation level, a deferrable read-only SQL transaction may be delayed before it is allowed to proceed. However, once it begins executing it does not incur any of the overhead required to ensure serializability; so serialization code will have no reason to force it to abort because of concurrent updates, making this option suitable for long-running read-only transactions.

This parameter controls the default deferrable status of each new transaction. It currently has no effect on read-write transactions or those operating at isolation levels lower than serializable. The default is off.

Consult sql-set-transaction for more information.

Recommendations

If you use serializable transactions by default, it may be also useful to set this in order to decrease the overhead of long-running transactions.

Comments