Re: Add two missing tests in 035_standby_logical_decoding.pl
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-26T11:10:10Z
Lists: pgsql-hackers
Attachments
- v6-0001-Add-subscription-to-the-standby-test-in-035_stand.patch (text/plain) patch v6-0001
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
Commits
-
Fix the race condition in the test case added by commit a6e04b1d20.
- c5b7f67fcc8c 16.0 landed
-
Test that invalidated logical slots doesn't retain WAL.
- a6e04b1d20c2 16.0 landed
-
Add a test to verify that subscription to the standby works.
- 376dc820531b 16.0 landed
-
Reduce the log level in 035_standby_logical_decoding.pl.
- 3034dc56ef4b 16.0 landed