Perceptive readers probably noticed the pool_mode configuration setting both in the documentation and in the example file. The possible options for this setting can essentially be summarized as follows:
- Session: A PostgreSQL setting is assigned to a client until the client disconnects. This is considered to be the safest method, but greedy applications can monopolize limited connections by never freeing them. This is the default, and we don't change it in our instructions.
- Transaction: Connections are assigned to clients until they complete a single transaction. Once the transaction is either committed or aborted, the connection re-enters the pool and is assigned to another client. This is a good setting to use for ...