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: Amit Kapila <amit.kapila16@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, vignesh C
<vignesh21@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-27T07:35:03Z
Lists: pgsql-hackers
Attachments
- v7-0001-Add-subscription-to-the-standby-test-in-035_stand.patch (text/plain) patch v7-0001
Hi,
On 4/27/23 5:37 AM, Amit Kapila wrote:
> On Wed, Apr 26, 2023 at 4:41 PM Drouvot, Bertrand
> <bertranddrouvot.pg@gmail.com> wrote:
>
> +When in recovery, the default value of target_lsn is $node->lsn('replay')
> +instead. This is needed when the publisher passed to
> wait_for_subscription_sync()
> +is a standby node.
>
> I think this will be useful whenever wait_for_catchup has been called
> for a standby node (where self is a standby node). I have tried even
> by commenting wait_for_subscription_sync in the new test then it fails
> for $node_standby->wait_for_catchup('tap_sub');. So instead, how about
> a comment like: "When in recovery, the default value of target_lsn is
> $node->lsn('replay') instead which ensures that the cascaded standby
> has caught up to what has been replayed on the standby."?
>
I did it that way because wait_for_subscription_sync() was the first case I had
to work on but I do agree that your wording better describe the intend of the new
code.
Changed in V7 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