From bc75136019f288774a6e65672cbe3d62d2502c35 Mon Sep 17 00:00:00 2001 From: pranshi06 <85474619+pranshi06@users.noreply.github.com> Date: Thu, 23 Mar 2023 19:24:26 +0530 Subject: [PATCH] pro, server: fix event trigger log cleanup regression in Postgres event triggers PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8460 GitOrigin-RevId: 17e7b73d3b92459ff9149391ecd46ccb9a0846e5 --- server/src-lib/Hasura/Backends/Postgres/DDL/EventTrigger.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src-lib/Hasura/Backends/Postgres/DDL/EventTrigger.hs b/server/src-lib/Hasura/Backends/Postgres/DDL/EventTrigger.hs index bd479b2e211..ead155ca0f5 100644 --- a/server/src-lib/Hasura/Backends/Postgres/DDL/EventTrigger.hs +++ b/server/src-lib/Hasura/Backends/Postgres/DDL/EventTrigger.hs @@ -1058,7 +1058,7 @@ deleteEventTriggerLogsTx TriggerLogCleanupConfig {..} = do [ST.st| SELECT id FROM hdb_catalog.event_log WHERE ((delivered = true OR error = true) AND trigger_name = $1) - AND created_at < now() - interval '#{qRetentionPeriod}' + AND created_at < (now() - interval '#{qRetentionPeriod}') AT TIME ZONE 'UTC' AND locked IS NULL LIMIT $2 |]