I'm running a cron job using pg_cron.
The job is running some cleanup queries, that occasionally takes longer to complete.
When that happens, the job fails on
statement timeout
of 2 min which is the default
ERROR: canceling statement due to statement timeout
I'd like to increase the statement_timeout
for this job.
set statement_timeout='1200s'
select do_cleanup_tasks()
What would be the scope of this statement timeout change?
Will it effect only the execution of this transaction, or it has a wider effect?
Asked by arik alon
(1 rep)
Dec 27, 2023, 11:42 AM
Last activity: Dec 27, 2023, 06:35 PM
Last activity: Dec 27, 2023, 06:35 PM