Missing import in 035_standby_logical_decoding.pl

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Missing import in 035_standby_logical_decoding.pl
Date: 2025-08-01 19:04:20
Message-ID: CAAKRu_YO2mEm=ZWZKPjTMU=gW5Y83_KMi_1cr51JwavH0ctd7w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

035_standby_logical_decoding.pl has this code

# wait for postgres to terminate
foreach my $i (0 .. 10 * $PostgreSQL::Test::Utils::timeout_default)
{
last if !-f $node_standby->data_dir . '/postmaster.pid';
usleep(100_000);
}

but it does not import usleep as other tests do (like this)
use Time::HiRes qw(usleep);

I think it simply hasn't been called because postgres exits and
terminates the loop before it has had a chance to be called. If you
reorder the sleep and the loop termination condition, it fails
immediately because it can't find usleep.

On an unrelated note, I also noticed that hot_standby_feedback is not
turned on during the test until we are explicitly checking for
recovery conflicts. When it is enabled, the comment says "Turn
hot_standby_feedback back on" -- but it was never on to begin with. I
suspect this doesn't produce test instability because autovacuum is
turned off for the whole test. But, I was wondering if the test
authors meant for hot_standby_feedback to be enabled during the
initial phases of the test (until it is explicitly disabled for
testing purposes).

- Melanie

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2025-08-01 19:07:34 Re: Improve the performance of Unicode Normalization Forms.
Previous Message Alexander Borisov 2025-08-01 19:00:08 Re: Improve the performance of Unicode Normalization Forms.