Re: Injection points: preloading and runtime arguments

2024-06-10 Thread Michael Paquier
On Sat, Jun 08, 2024 at 04:52:25PM +0500, Andrey M. Borodin wrote: > Alvaro, here’s the test for multixact CV sleep that I was talking > about on PGConf. > It is needed to test [0]. It is based on loaded injection > points. > This technique is not committed yet, but the patch looks good. OK,

Re: Injection points: preloading and runtime arguments

2024-06-08 Thread Andrey M. Borodin
> On 7 Jun 2024, at 04:38, Michael Paquier wrote: Thanks Michael! Tests of injection points with injection points are neat :) Alvaro, here’s the test for multixact CV sleep that I was talking about on PGConf. It is needed to test [0]. It is based on loaded injection points. This technique

Re: Injection points: preloading and runtime arguments

2024-06-06 Thread Michael Paquier
On Thu, Jun 06, 2024 at 03:47:47PM +0500, Andrey M. Borodin wrote: > Is it OK to detach() before wakeup()? Or, perhaps, can a detach() do a > wakeup() automatically? It is OK to do a detach before a wakeup. Noah has been relying on this behavior in an isolation test for a patch he's worked on.

Re: Injection points: preloading and runtime arguments

2024-06-06 Thread Andrey M. Borodin
> On 5 Jun 2024, at 03:52, Michael Paquier wrote: > > Another thing you could do is to define a > INJECTION_POINT_LOAD() in the code path you're stressing outside the > critical section where the point is run. This should save from a call > to the SQL function. This choice is up to the one

Re: Injection points: preloading and runtime arguments

2024-06-04 Thread Michael Paquier
On Tue, May 21, 2024 at 04:29:54PM +0500, Andrey M. Borodin wrote: > Currently I'm working on the test using this > $creator->query_until(qr/start/, q( > \echo start > select injection_points_wakeup(''); > select test_create_multixact(); > )); > > I'm fine if instead of

Re: Injection points: preloading and runtime arguments

2024-05-21 Thread Andrey M. Borodin
> On 21 May 2024, at 06:31, Michael Paquier wrote: > > So I agree that 0002 ought to call injection_init_shmem() when calling > injection_points_preload(), but it also seems to me that the test is > missing the fact that it should heat the backend cache to avoid the > allocations in the

Re: Injection points: preloading and runtime arguments

2024-05-20 Thread Michael Paquier
On Mon, May 20, 2024 at 05:01:15PM +0500, Andrey M. Borodin wrote: > Both features look useful to me. > I've tried to rebase my test of CV sleep during multixact generation[0]. I > used it like this: > > INJECTION_POINT_PRELOAD("GetNewMultiXactId-done"); > multi =

Re: Injection points: preloading and runtime arguments

2024-05-20 Thread Andrey M. Borodin
> On 20 May 2024, at 17:01, Andrey M. Borodin wrote: Ugh, accidentally send without attaching the patch itself. Sorry for the noise. Best regards, Andrey Borodin. 0001-Add-multixact-CV-sleep.patch Description: Binary data

Re: Injection points: preloading and runtime arguments

2024-05-20 Thread Andrey M. Borodin
Hi! > On 20 May 2024, at 08:18, Michael Paquier wrote: Both features look useful to me. I've tried to rebase my test of CV sleep during multixact generation[0]. I used it like this: INJECTION_POINT_PRELOAD("GetNewMultiXactId-done"); multi = GetNewMultiXactId(nmembers, ); // starts

Injection points: preloading and runtime arguments

2024-05-19 Thread Michael Paquier
Hi all, I have a couple of extra toys for injection points in my bucket that I'd like to propose for integration in v18, based on some feedback I have received: 1) Preload an injection point into the backend-level cache without running it. This has come up because an injection point run for the