Hi!

> On 20 May 2024, at 08:18, Michael Paquier <mich...@paquier.xyz> 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, &offset); // starts critsection
    INJECTION_POINT("GetNewMultiXactId-done");

And it fails like this:

2024-05-20 16:50:40.430 +05 [21830] 001_multixact.pl LOG:  statement: select 
test_create_multixact();
TRAP: failed Assert("CritSectionCount == 0 || (context)->allowInCritSection"), 
File: "mcxt.c", Line: 1185, PID: 21830
0   postgres                            0x0000000101452ed0 ExceptionalCondition 
+ 220
1   postgres                            0x00000001014a6050 MemoryContextAlloc + 
208
2   postgres                            0x00000001011c3bf0 
dsm_create_descriptor + 72
3   postgres                            0x00000001011c3ef4 dsm_attach + 400
4   postgres                            0x00000001014990d8 dsa_attach + 24
5   postgres                            0x00000001011c716c init_dsm_registry + 
240
6   postgres                            0x00000001011c6e60 GetNamedDSMSegment + 
456
7   injection_points.dylib              0x0000000101c871f8 injection_init_shmem 
+ 60
8   injection_points.dylib              0x0000000101c86f1c injection_wait + 64
9   postgres                            0x000000010148e228 
InjectionPointRunInternal + 376
10  postgres                            0x000000010148e0a4 InjectionPointRun + 
32
11  postgres                            0x0000000100cab798 
MultiXactIdCreateFromMembers + 344
12  postgres                            0x0000000100cab604 MultiXactIdCreate + 
312

Am I doing something wrong? Seems like extension have to know too that it is 
preloaded.


Best regards, Andrey Borodin.

[0] 
https://www.postgresql.org/message-id/0925F9A9-4D53-4B27-A87E-3D83A757B0E0%40yandex-team.ru

Reply via email to