pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix test_misc/010_index_concurrently_upsert for cache-clobbering
Date: Tue, 13 Jan 2026 09:05:31 +0000
Message-ID: <E1vfaLD-000BuR-0X@gemulon.postgresql.org> (raw)

Fix test_misc/010_index_concurrently_upsert for cache-clobbering builds

The test script added by commit e1c971945d62 failed to handle the case
of cache-clobbering builds (CLOBBER_CACHE_ALWAYS and
CATCACHE_FORCE_RELEASE) properly -- it would only exit a loop on
timeout, which is slow, and unfortunate because I (Álvaro) increased the
timeout for that loop to the complete default TAP test timeout, causing
the buildfarm to report the whole test run as a timeout failure.  We can
be much quicker: exit the loop as soon as the backend is seen as waiting
on the injection point.

In this commit we still reduce the timeout (of that loop and a nearby
one just to be safe) to half of the default.

I (Álvaro) had also changed Mihail's "sleep(1)" to "sleep(0.1)", which
apparently turns a 1s sleep into a 0s sleep, because Perl -- probably
making this a busy loop.  Use Time::HiRes::usleep instead, like we do in
other tests.

Author: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CADzfLwWOVyJygX6BFuyuhTKkJ7uw2e8OcVCDnf6iqnOFhMPE%2BA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8a47d9ee7fa25bb10b8cde46dc7a4d28e95e354e

Modified Files
--------------
.../test_misc/t/010_index_concurrently_upsert.pl   | 43 ++++++++++++++--------
1 file changed, 27 insertions(+), 16 deletions(-)



Message-ID: <E1vfaLD-000BuR-0X@gemulon.postgresql.org>
Permalink:  ../E1vfaLD-000BuR-0X@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vfaLD-000BuR-0X@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: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix test_misc/010_index_concurrently_upsert for cache-clobbering
  In-Reply-To: <E1vfaLD-000BuR-0X@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox