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: "Yu Shi (Fujitsu)" <shiy.fnst@fujitsu.com>,
Amit Kapila <amit.kapila16@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-26T14:23:06Z
Lists: pgsql-hackers
Attachments
- v6-0001-Add-retained-WAL-test-in-035_standby_logical_deco.patch (text/plain) patch v6-0001
Hi, On 4/26/23 11:58 AM, Yu Shi (Fujitsu) wrote: > On Mon, Apr 24, 2023 8:07 PM Drouvot, Bertrand <bertranddrouvot.pg@gmail.com> wrote: > I think that's because when replaying a checkpoint record, the startup process > of standby only saves the information of the checkpoint, and we need to wait for > the checkpointer to perform a restartpoint (see RecoveryRestartPoint), right? If > so, could we force a checkpoint on standby? After this, the standby should have > completed the restartpoint and we don't need to wait. > Thanks for looking at it! Oh right, that looks like good a good way to ensure the WAL file is removed on the standby so that we don't need to wait. Implemented that way in V6 attached and that works fine. > Besides, would it be better to wait for the cascading standby? If the wal log > file needed for cascading standby is removed on the standby, the subsequent test > will fail. Good catch! I agree that we have to wait on the cascading standby before removing the WAL files. It's done in V6 (and the test is not failing anymore if we set a recovery_min_apply_delay to 5s on the cascading standby). 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