Hi,
On 2025-06-03 13:13:06 +0900, Michael Paquier wrote:
> On Mon, Jun 02, 2025 at 12:42:35PM -0700, Jeff Davis wrote:
> > This seems like a fair amount of complexity for a single use case.
> > Arguably, complexity around testing infrastructure is a lot less of a
> > problem than other kinds of complexity, so it might be OK. But it would
> > be nice if there were a couple cases that would benefit rather than
> > one.
>
> In all the approaches I've considered, this one was the least worst of
> all based on the point that all the complexity is hidden in the test
> module; there is no need to touch the backend code at all as long as
> there is a way to retrieve the list of points that would be dumped to
> disk.
>
> Another set of test cases I had in mind was waits during recovery
> before consistency is reached. There is no way to add a point without
> connecting to the database, and we've had plenty of fixes involving
> the startup process and a different process, mostly the checkpointer.
> That's an annoying limitation.
I'm somewhat doubtful this is is the right direction. Tests that require
injection points before consistency also can't wait for injection points using
the SQL interface or such, so most of the stuff has to be written in C
anyway. And if so, you also can attach to injection points in the relevant
shared_preload_libraries entry.
Greetings,
Andres Freund