Re: Adding facility for injection points (or probe points?) for more advanced tests
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-11-15T11:21:40Z
Lists: pgsql-hackers
On 2023-Nov-15, Michael Paquier wrote: > On Tue, Nov 14, 2023 at 02:11:50PM +0100, Alvaro Herrera wrote: > > You named the hash table InjectionPointHashByName, which seems weird. > > Is there any *other* way to locate an injection point that is not by > > name? > > I am not sure what you mean here. Names are kind of the most > portable and simplest thing I could think of. Oh, I think you're overthinking what my comment was. I was saying, just name it "InjectionPointsHash". Since there appears to be no room for another hash table for injection points, then there's no need to specify that this one is the ByName hash. I couldn't think of any other way to organize the injection points either. > > In this patch, injection points are instance-wide (because the hash > > table is in shmem). > > Yes, still not something that's required in the core APIs or an > initial batch. I agree that we can do the easy thing first and build it up later. I just hope we don't get too wedded on the current interface because of lack of time in the current release that we get stuck with it. > I am not sure that it is a good idea to enforce a specific conditional > logic in the backend core code. Agreed, let's get more experience on what other types of tests people want to build, and how are things going to interact with each other. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "No necesitamos banderas No reconocemos fronteras" (Jorge González)
Commits
-
ci: Enable injection points in builds
- 183b6f73b04e 17.0 landed
-
Fix two memcpy() bugs in the new injection point code
- 0eb23285a257 17.0 landed
-
Add test module injection_points
- 49cd2b93d7db 17.0 landed
-
Add backend support for injection points
- d86d20f0ba79 17.0 landed
-
Refactor code checking for file existence
- e72a37528dda 17.0 landed