Skip to content

egon-orm-workspace / @egon-orm/postgres / PostgresPoolOptions

Interface: PostgresPoolOptions ​

Defined in: postgres/src/options.ts:17

Pool settings for the pool the adapter creates.

Example ​

ts
const pool: PostgresPoolOptions = { max: 20, idleTimeoutMs: 30_000, connectionTimeoutMs: 5_000 };

Properties ​

connectionTimeoutMs? ​

ts
readonly connectionTimeoutMs?: number;

Defined in: postgres/src/options.ts:26

How long to wait for a connection, in milliseconds, both to open a new one and for a busy pool to free one; 0 waits forever. Default 0.


idleTimeoutMs? ​

ts
readonly idleTimeoutMs?: number;

Defined in: postgres/src/options.ts:21

How long an unused connection stays open, in milliseconds; 0 keeps it open. Default 10,000.


max? ​

ts
readonly max?: number;

Defined in: postgres/src/options.ts:19

The most connections the pool opens. Default 10.