pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix the race condition in the test case added by commit a6e04b1d 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix the race condition in the test case added by commit a6e04b1d @ 2023-05-09 09:00 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Amit Kapila @ 2023-05-09 09:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix the race condition in the test case added by commit a6e04b1d20. The commit a6e04b1d20 added a test to ensure that the invalidated logical slots don't retain WAL. The test was ensuring that the checkpoint removes the WAL files corresponding to invalidated logical slots on the standby node but missed the point that the standby node also had a physical slot which led to the prevention of WAL file removal. Move the creation of physical slot on the standby and initialization of cascading standby closer to the test case that actually required it so that other tests don't get affected by the presence of the physical slot on standby. Author: Bertrand Drouvot Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/2fefa454-5a70-2174-ddbf-4a0e41537139@gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c5b7f67fcc8c4a01c82660eb0996a3c697fac283 Modified Files -------------- .../recovery/t/035_standby_logical_decoding.pl | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix the race condition in the test added by 7c99dc587. @ 2025-05-13 04:41 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Amit Kapila @ 2025-05-13 04:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix the race condition in the test added by 7c99dc587. After executing ALTER SUBSCRIPTION tap_sub SET PUBLICATION, we did not wait for the new walsender process to restart. As a result, an INSERT executed immediately after the ALTER could be decoded and skipped, considering it is not part of any subscribed publication. And, the old apply worker could also confirm the LSN of such an INSERT. This could cause the replication to resume from a point after the INSERT. In such cases, we miss the expected warning about the missing publication. To fix this, ensure the walsender has restarted before continuing after ALTER SUBSCRIPTION. Reported-by: Tom Lane as per CI Author: vignesh C <vignesh21@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Discussion: https://postgr.es/m/1230066.1745992333@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8ede692de512750ecb6930213e6d78ed90ef06d0 Modified Files -------------- src/test/subscription/t/024_add_drop_pub.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-05-13 04:41 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-05-09 09:00 pgsql: Fix the race condition in the test case added by commit a6e04b1d Amit Kapila <akapila@postgresql.org> 2025-05-13 04:41 pgsql: Fix the race condition in the test added by 7c99dc587. Amit Kapila <akapila@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox