diff --git a/src/databases/Postgres.ts b/src/databases/Postgres.ts index 5253ad1..a0b0128 100644 --- a/src/databases/Postgres.ts +++ b/src/databases/Postgres.ts @@ -105,7 +105,7 @@ export class Postgres implements IDatabase { Logger.debug(`prepare (postgres): type: ${type}, query: ${query}, params: ${params}`); - if (this.config.postgres.maxActiveRequests + if (this.config.postgres.maxActiveRequests && this.isReadQuery(type) && this.activePostgresRequests > this.config.postgres.maxActiveRequests) { throw new Error("Too many active postgres requests"); }