max_prepared_transactions

Many people see this name and assume that as they use prepared statements, a common technique to avoid SQL injection, they need to increase this value. This is not the case; the two are not related. A prepared transaction is one that uses PREPARE TRANSACTION for a two-phase commit (2PC). If you're not specifically using that command and 2PC, you can leave this value at its default. If you are using these features, only then will you likely need to increase it to match the number of connections.

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.