Re: Add two missing tests in 035_standby_logical_decoding.pl

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add two missing tests in 035_standby_logical_decoding.pl
Date: 2023-04-26 11:10:10
Message-ID: 19d8fa0d-e840-66eb-f5bc-4c3f9594ec8b@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 4/26/23 12:27 PM, Alvaro Herrera wrote:
>> diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
>> index 6f7f4e5de4..819667d42a 100644
>> --- a/src/test/perl/PostgreSQL/Test/Cluster.pm
>> +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
>> @@ -2644,7 +2644,16 @@ sub wait_for_catchup
>> }
>> if (!defined($target_lsn))
>> {
>> - $target_lsn = $self->lsn('write');
>> + my $isrecovery = $self->safe_psql('postgres', "SELECT pg_is_in_recovery()");
>> + chomp($isrecovery);
>> + if ($isrecovery eq 't')
>> + {
>> + $target_lsn = $self->lsn('replay');
>> + }
>> + else
>> + {
>> + $target_lsn = $self->lsn('write');
>> + }
>
> Please modify the function's documentation to account for this code change.
>

Good point, thanks! Done in V6 attached.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v6-0001-Add-subscription-to-the-standby-test-in-035_stand.patch text/plain 7.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2023-04-26 11:13:59 Re: Add two missing tests in 035_standby_logical_decoding.pl
Previous Message Daniel Gustafsson 2023-04-26 11:02:26 Re: Find dangling membership roles in pg_dumpall