Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ const processOptions = async (options: RunnerOptions) => {
);
}

pgPool.on("error", err => {
/*
* This handler is required so that client connection errors don't bring
* the server down (via `unhandledError`).
*
* `pg` will automatically terminate the client and remove it from the
* pool, so we don't actually need to take any action here, just ensure
* that the event listener is registered.
*/
// eslint-disable-next-line no-console
console.error("PostgreSQL client generated error: ", err.message);
});

Comment thread
madflow marked this conversation as resolved.
const withPgClient = makeWithPgClientFromPool(pgPool);

// Migrate
Expand Down