RE: Fix 035_standby_logical_decoding.pl race conditions
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Amit Kapila' <amit.kapila16@gmail.com>, Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-26T07:47:36Z
Lists: pgsql-hackers
Attachments
- 0001-Use-injection_point-to-stabilize-035_standby_logical.patch (application/octet-stream) patch 0001
Dear Amit, Bertrand, > Seeing all these failures, I wonder whether we can reliably test > active slots apart from wal_level change test (aka Scenario 6: > incorrect wal_level on primary.). Sure, we can try by having some > injection point kind of tests, but is it really worth because, anyway > the active slots won't get invalidated in the scenarios for row > removal we are testing in this case. The other possibility is to add a > developer-level debug_disable_running_xact GUC to test this and > similar cases, or can't we have an injection point to control logging > this WAL record? I have seen the need to control logging running_xact > record in other cases as well. Based on the idea which controls generating RUNNING_XACTS, I prototyped a patch. When the instance is attached the new injection point, all processes would skip logging the record. This does not need to extend injection_point module. I tested with reproducer and passed on my env. Sadly IS_INJECTION_POINT_ATTACHED() was introduced for PG18 so that the patch could not backport for PG17 as-is. How do you feel? Best regards, Hayato Kuroda FUJITSU LIMITED
Commits
-
Stabilize 035_standby_logical_decoding.pl.
- 105b2cb33617 18.0 landed
- 17a165d60f73 17.5 landed
- 86392e8827d8 16.9 landed