Passwords Rotation
import type { PoolConfig } from "pg";
export const cluster = new Cluster<PgClient, PgClientOptions>({
islands: () => [
{
no: 0,
nodes: [
{
name: "island0-master",
config: {
connectionString: myConfig.DATABASE_URL_1,
...,
} satisfies PoolConfig,
},
{
name: "island0-master", // same name!
config: {
connectionString: myConfig.DATABASE_URL_2,
...,
} satisfies PoolConfig,
},
...,
],
},
],
createClient: (node) => new PgClient(node),
...,
});Config Hot Reloading
Last updated