Re: Injection points: preloading and runtime arguments

x4mmm@yandex-team.ru

From: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
To: Michael Paquier <michael@paquier.xyz>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-08-02T16:03:58Z
Lists: pgsql-hackers

Attachments


> On 18 Jul 2024, at 03:55, Michael Paquier <michael@paquier.xyz> wrote:
> 
> If there is anything else you would like to see adjusted in this area,
> please let me know.

I’ve tried to switch my multixact test to new INJECTION_POINT_CACHED… and it does not work for me. Could you please take a look?

2024-08-02 18:52:32.244 MSK [53155] 001_multixact.pl LOG:  statement: select test_create_multixact();
TRAP: failed Assert("CritSectionCount == 0 || (context)->allowInCritSection"), File: "mcxt.c", Line: 1186, PID: 53155
0   postgres                            0x00000001031212f0 ExceptionalCondition + 236
1   postgres                            0x000000010317a01c MemoryContextAlloc + 240
2   postgres                            0x0000000102e66158 dsm_create_descriptor + 80
3   postgres                            0x0000000102e66474 dsm_attach + 416
4   postgres                            0x000000010316c264 dsa_attach + 24
5   postgres                            0x0000000102e69994 init_dsm_registry + 256
6   postgres                            0x0000000102e6965c GetNamedDSMSegment + 492
7   injection_points.dylib              0x000000010388f2cc injection_init_shmem + 68
8   injection_points.dylib              0x000000010388efbc injection_wait + 72
9   postgres                            0x00000001031606bc InjectionPointCached + 72
10  postgres                            0x00000001028ffc70 MultiXactIdCreateFromMembers + 360
11  postgres                            0x00000001028ffac8 MultiXactIdCreate + 344
12  test_slru.dylib                     0x000000010376fa04 test_create_multixact + 52


The test works fine with SQL interface “select injection_points_load('get-new-multixact-id');”.
Thanks!


Best regards, Andrey Borodin.

Commits

  1. Add INJECTION_POINT_CACHED() to run injection points directly from cache

  2. Support loading of injection points