agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make plpgsql_trap test more robust and less resource-intensive.
Date: Tue, 21 Apr 2026 14:54:54 +0000
Message-ID: <E1wFCV3-0021O7-1t@gemulon.postgresql.org> (raw)
Make plpgsql_trap test more robust and less resource-intensive.
We were using "select count(*) into x from generate_series(1,
1_000_000_000_000)" to waste one second waiting for a statement
timeout trap. Aside from consuming CPU to little purpose, this could
easily eat several hundred MB of temporary file space, which has been
observed to cause out-of-disk-space errors in the buildfarm.
Let's just use "pg_sleep(10)", which is far less resource-intensive.
Also update the "when others" exception handler so that if it does
ever again trap an error, it will tell us what error. The cause of
these intermittent buildfarm failures had been obscure for awhile.
Discussion: https://postgr.es/m/557992.1776779694@sss.pgh.pa.us
Backpatch-through: 14
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/8a5729a8ef28e26e5e9cb6829e6b2a77feabaa69
Modified Files
--------------
src/pl/plpgsql/src/expected/plpgsql_trap.out | 8 +++-----
src/pl/plpgsql/src/sql/plpgsql_trap.sql | 6 ++----
2 files changed, 5 insertions(+), 9 deletions(-)
view thread (6+ messages) latest in thread
Message-ID: <E1wFCV3-0021O7-1t@gemulon.postgresql.org>
Permalink: ../E1wFCV3-0021O7-1t@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wFCV3-0021O7-1t@gemulon.postgresql.org
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Make plpgsql_trap test more robust and less resource-intensive.
In-Reply-To: <E1wFCV3-0021O7-1t@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox