Database
Postgres
Use a pg.Pool as your Restaq execution store.
Pass a pg.Pool straight into restaq({ database }). Restaq detects the
dialect automatically and applies its own schema migrations.
pnpm add pgnpm install pgyarn add pgbun add pg// relay.ts
import { restaq as createRestaq } from 'restaq';
import { Pool } from 'pg';
export const restaq = createRestaq({
database: new Pool({ connectionString: process.env.DATABASE_URL! }),
plugins: [
// ...
],
});Recommended for production, and for any deployment running more than one instance of your app. See Migrations for how to apply schema changes before scaling up.