Re: Injection points: some tools to wait and wake - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: Injection points: some tools to wait and wake
Date
Msg-id 6426C4A0-DFFA-4B3B-B49E-CA1A6F40C81B@yandex-team.ru
Whole thread Raw
In response to Re: Injection points: some tools to wait and wake  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Injection points: some tools to wait and wake
List pgsql-hackers

> On 27 Feb 2024, at 04:29, Michael Paquier <michael@paquier.xyz> wrote:
>
> For
> example, the test just posted here does not rely on that:
> https://www.postgresql.org/message-id/ZdyZya4YrNapWKqz@ip-10-97-1-34.eu-west-3.compute.internal

Instead, that test is scanning logs

+ # Note: $node_primary->wait_for_replay_catchup($node_standby) would be
+ # hanging here due to the injection point, so check the log instead.+
+ my $terminated = 0;
+ for (my $i = 0; $i < 10 * $PostgreSQL::Test::Utils::timeout_default; $i++)
+ {
+ if ($node_standby->log_contains(
+ 'terminating process .* to release replication slot \"injection_activeslot\"', $logstart))
+ {
+ $terminated = 1;
+ last;
+ }
+ usleep(100_000);
+ }

But, AFAICS, the purpose is the same: wait until event happened.


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: WIP Incremental JSON Parser
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: A failure in t/001_rep_changes.pl