type

PoolConfig

Production connection-pool, upload-lock-pool, lifetime, health, and server timeout controls.

Properties

PropertyTypeDescription
DatabaseURLstringThe DatabaseURL value.
AllowInsecureTransportboolAllowInsecureTransport 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.
ApplicationNamestringThe ApplicationName value.
MaxConnectionsint32The MaxConnections value.
MaxUploadLockConnectionsint32MaxUploadLockConnections 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.
MinConnectionsint32The MinConnections value.
MaxConnectionLifetimetime.DurationThe MaxConnectionLifetime value.
MaxConnectionLifetimeJittertime.DurationThe MaxConnectionLifetimeJitter value.
MaxConnectionIdleTimetime.DurationThe MaxConnectionIdleTime value.
HealthCheckPeriodtime.DurationThe HealthCheckPeriod value.
ConnectTimeouttime.DurationThe ConnectTimeout value.
StatementTimeouttime.DurationThe StatementTimeout value.
LockTimeouttime.DurationThe LockTimeout value.
IdleInTransactionSessionTimeouttime.DurationThe 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 }

Source adapters/postgres/postgres.go:44