Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: scope statement_timeout to transaction with SET LOCAL

Claude7a5866df0c8d
diff --git a/backend/src/services/identity-access-token/identity-access-token-revocation-dal.ts b/backend/src/services/identity-access-token/identity-access-token-revocation-dal.ts
index 92497daccf..41e46ab23c 100644
--- a/backend/src/services/identity-access-token/identity-access-token-revocation-dal.ts
+++ b/backend/src/services/identity-access-token/identity-access-token-revocation-dal.ts
@@ -85,7 +85,7 @@ export const identityAccessTokenRevocationDALFactory = (db: TDbClient) => {
try {
// eslint-disable-next-line no-await-in-loop
deletedRevocationIds = await db.transaction(async (trx) => {
- await trx.raw(`SET statement_timeout = ${QUERY_TIMEOUT_MS}`);
+ await trx.raw(`SET LOCAL statement_timeout = ${QUERY_TIMEOUT_MS}`);
const findExpiredRevocationsSubQuery = trx(TableName.IdentityAccessTokenRevocation)
.where("expiresAt", "<", db.fn.now())