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
This commit is contained in:
pranshi06 2023-03-23 19:24:26 +05:30 committed by hasura-bot
parent 5549c4aa1b
commit bc75136019

View File

@ -1058,7 +1058,7 @@ deleteEventTriggerLogsTx TriggerLogCleanupConfig {..} = do
[ST.st| [ST.st|
SELECT id FROM hdb_catalog.event_log SELECT id FROM hdb_catalog.event_log
WHERE ((delivered = true OR error = true) AND trigger_name = $1) 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 AND locked IS NULL
LIMIT $2 LIMIT $2
|] |]