Re: Add two missing tests in 035_standby_logical_decoding.pl
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>,
"Yu Shi (Fujitsu)" <shiy.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-08T02:42:12Z
Lists: pgsql-hackers
On Sat, May 6, 2023 at 9:33 PM Drouvot, Bertrand <bertranddrouvot.pg@gmail.com> wrote: > > On 5/6/23 3:28 PM, Amit Kapila wrote: > > On Sat, May 6, 2023 at 1:52 PM Drouvot, Bertrand > > <bertranddrouvot.pg@gmail.com> wrote: > > > Next steps: > > ========= > > 1. The first thing is we should verify this theory by adding some LOG > > in KeepLogSeg() to see if the _logSegNo is reduced due to the value > > returned by XLogGetReplicationSlotMinimumLSN(). > > Yeah, will do that early next week. > > > 2. The reason for the required file not being removed in the primary > > is also that it has a physical slot which prevents the file removal. > > Yeah, agree. But this one is not an issue as we are not > checking for the WAL file removal on the primary, do you agree? > Agreed. > > 3. If the above theory is correct then I see a few possibilities to > > fix this test (a) somehow ensure that restart_lsn of the physical slot > > on standby is advanced up to the point where we can safely remove the > > required files; (b) just create a separate test case by initializing a > > fresh node for primary and standby where we only have logical slots on > > standby. This will be a bit costly but probably less risky. (c) any > > better ideas? > > > > (c): Since, I think, the physical slot on the primary is not a concern for > the reason mentioned above, then instead of (b): > > What about postponing the physical slot creation on the standby and the > cascading standby node initialization after this test? > Yeah, that is also possible. But, I have a few questions regarding that: (a) There doesn't seem to be a physical slot on cascading standby, if I am missing something, can you please point me to the relevant part of the test? (b) Which test is currently dependent on the physical slot on standby? -- With Regards, Amit Kapila.
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