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: vignesh C <vignesh21@gmail.com>, "Yu Shi (Fujitsu)"
<shiy.fnst@fujitsu.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-06T08:22:10Z
Lists: pgsql-hackers
Hi, On 5/6/23 4:10 AM, Amit Kapila wrote: > On Fri, May 5, 2023 at 7:53 PM Drouvot, Bertrand > <bertranddrouvot.pg@gmail.com> wrote: >> >> On 5/5/23 2:28 PM, Amit Kapila wrote: >>> On Fri, May 5, 2023 at 5:36 PM Drouvot, Bertrand >> >> So, even on a successful test, we can see that the WAL file we expect to be removed on the standby has not been recycled on the primary before the test. >> > > Okay, one possibility of not removing on primary is that at the time > of checkpoint (when we compute RedoRecPtr), the wal_swtich and insert > is not yet performed because in that case it will compute the > RedoRecPtr as a location before those operations which would be 0000*3 > file. However, it is not clear how is that possible except from a > background checkpoint happening at that point but from LOGs, it > appears that the checkpoint triggered by test has recycled the wal > files. > >>> I think we need to add more DEBUG info to find that >>> out. Can you please try to print 'RedoRecPtr', '_logSegNo', and >>> recptr? >>> >> >> Yes, will do. >> > > Okay, thanks, please try to print similar locations on standby in > CreateRestartPoint(). > The extra information is displayed that way: https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR6822-R6830 https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR7269-R7271 https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR7281-R7284 There is 2 runs with this extra info in place: A successful one: https://cirrus-ci.com/task/6528745436086272 A failed one: https://cirrus-ci.com/task/4558139312308224 For both the testrun.zip is available in the Artifacts section. Sharing this now in case you want to have a look (I'll have a look at them early next week on my side). 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