Hi, Thanks all for the reviews/comments.
v2- attached addresses Bertrand's points. Fixed all. I also included some additional tests for injection_points_attach() since this function is no longer STRICT. On Mon, Aug 3, 2026 at 9:09 AM Daniel Gustafsson <[email protected]> wrote: > > > On 3 Aug 2026, at 13:16, Michael Paquier <[email protected]> wrote: > > FWIW, I like the idea proposed in this patch. > > > While looking at this patch, I'd like to have at least one valid test > > using it. > > +1, a test using the new facility seems like a requirement for this. At some > point we should probably consider documenting this module with a README, but > that's for another patch. > > -- > Daniel Gustafsson The facilities that this will be useful for are those in which the injection_point_set_local() cannot be used and thus we cannot clearly determine if the injection point is reached at the correct condition. [0] was one example, which led to this thread, but we dealt with this by using wait_for_log to ensure that we reached the correct code path. Looking at [1], if we want to test toast reloptions for autovacuum, we will need some type of way to ensure that we are inspecting the correct relations for the test. Since autovacuum cannot rely on injection_point_set_local because workers will not set the local injection point, we can use string conditions to ensure we reached the correct table. the nocfbot test attached shows how we can build such tests for autovacuum. The test fails without the latest patchset in [1]. CCing Nathan as his patch is being discussed. Without this condition string, to implement such a test, we will need a NOTICE to log and we will need to use regexp to examine the log to make sure our toast table fired at the correct injection point. With the condition string, we can simply just use wait_for_event since we know which table the injection point will fire on. This feature could enable further autovacuum tests as well. [0] https://www.postgresql.org/message-id/adWcVrX3jrHPoCmD%40paquier.xyz [1] https://www.postgresql.org/message-id/aFrUkYVyATVk2nsD%40nathan -- Sami Imseih Amazon Web Services (AWS)
nocfbot-v2-0002-test-autovacuum-toast-reloptions.patch
Description: Binary data
v2-0001-Allow-a-condition-string-in-an-injection-point.patch
Description: Binary data
