Transaction pooling, with prepared statements
A client holds a server connection only while its transaction runs. When the transaction ends, the next client gets that connection.
- Prepared statements work. pgmux prepares each statement again on the server that the client lands on. Clients need no flags.
- Client settings stay with their client. A
SET TimeZonefrom one client never reaches a different client. - Session mode is there too. Choose the mode for each database.
pool_mode: transaction
pool:
default_size: 20
query_wait_timeout: 30s
databases:
appdb:
pool_size: 50
reports:
dbname: appdb
pool_mode: session
pool_size: 5