pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Teja Jakkidi <teja.jakkidi05@gmail.com>
To: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Statement_timeout in procedure block
Date: Tue, 18 Jun 2024 15:11:39 -0700
Message-ID: <E0175C30-9A8F-4648-A2D5-36908FF6F695@gmail.com> (raw)
Hello PgAdmins,
We have a Postgres instance where we had set statement_timeout to 1hour at instance level.
However, today we noticed that one of our cron jobs which calls a stored procedure failed with timeout error as it was running for more than an hour.
I tried setting “Set local statement_timeout=‘2 h’” within the stored procedure expecting that the statement timeout will be 2hours for the SP execution. However it did not work as expected.
Can anyone please suggest what can be done here.
Thanks in advance,
J. Teja.
view thread (6+ messages) latest in thread
Message-ID: <E0175C30-9A8F-4648-A2D5-36908FF6F695@gmail.com>
Permalink: ../E0175C30-9A8F-4648-A2D5-36908FF6F695@gmail.com/
Also on: postgresql.org/message-id/E0175C30-9A8F-4648-A2D5-36908FF6F695@gmail.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: teja.jakkidi05@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Statement_timeout in procedure block
In-Reply-To: <E0175C30-9A8F-4648-A2D5-36908FF6F695@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox