From: | "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
Subject: | Re: Injection points: some tools to wait and wake |
Date: | 2024-02-27 06:00:10 |
Message-ID: | 6426C4A0-DFFA-4B3B-B49E-CA1A6F40C81B@yandex-team.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 27 Feb 2024, at 04:29, Michael Paquier <michael(at)paquier(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2024-02-27 06:07:09 | Re: A failure in t/001_rep_changes.pl |
Previous Message | Andrew Dunstan | 2024-02-27 05:20:42 | Re: WIP Incremental JSON Parser |