type
PoolConfig
Production connection-pool, upload-lock-pool, lifetime, health, and server timeout controls.
Properties
| Property | Type | Description |
|---|---|---|
DatabaseURL | string | The DatabaseURL value. |
AllowInsecureTransport | bool | AllowInsecureTransport explicitly permits plaintext PostgreSQL connections. Keep this false in production; it exists for local Unix sockets and development databases whose transport is secured outside PostgreSQL. |
ApplicationName | string | The ApplicationName value. |
MaxConnections | int32 | The MaxConnections value. |
MaxUploadLockConnections | int32 | MaxUploadLockConnections bounds the separate advisory-lock pool used while object storage and document transactions are coordinated. Keeping this pool separate prevents staged uploads from starving their own document transactions. Zero selects four connections. |
MinConnections | int32 | The MinConnections value. |
MaxConnectionLifetime | time.Duration | The MaxConnectionLifetime value. |
MaxConnectionLifetimeJitter | time.Duration | The MaxConnectionLifetimeJitter value. |
MaxConnectionIdleTime | time.Duration | The MaxConnectionIdleTime value. |
HealthCheckPeriod | time.Duration | The HealthCheckPeriod value. |
ConnectTimeout | time.Duration | The ConnectTimeout value. |
StatementTimeout | time.Duration | The StatementTimeout value. |
LockTimeout | time.Duration | The LockTimeout value. |
IdleInTransactionSessionTimeout | time.Duration | The IdleInTransactionSessionTimeout value. |
How it works
Zero values select bounded Ridu defaults. Negative duration values explicitly disable the corresponding timeout.
AllowInsecureTransport is for local sockets or externally secured development transport; keep it false in production. The upload lock pool defaults to four connections and stays separate so staged uploads cannot starve their own document transactions.
Full signature
type PoolConfig struct {
DatabaseURL string
// AllowInsecureTransport explicitly permits plaintext PostgreSQL
// connections to a remote host. Loopback and Unix-socket databases never
// need it. Keep this false in production; it exists for development
// databases whose transport is secured outside PostgreSQL.
AllowInsecureTransport bool
ApplicationName string
MaxConnections int32
// MaxUploadLockConnections bounds the separate advisory-lock pool used
// while object storage and document transactions are coordinated. Keeping
// this pool separate prevents staged uploads from starving their own
// document transactions. Zero selects four connections.
MaxUploadLockConnections int32
MinConnections int32
MaxConnectionLifetime time.Duration
MaxConnectionLifetimeJitter time.Duration
MaxConnectionIdleTime time.Duration
HealthCheckPeriod time.Duration
ConnectTimeout time.Duration
StatementTimeout time.Duration
LockTimeout time.Duration
IdleInTransactionSessionTimeout time.Duration
}