Hi,
I ran into "new multixact has more than one updating member" while load
testing a trigger-based extension, and found this thread. In case it
helps with committing and back-patching, here is a plain-SQL reproducer
that needs no injection points and no crash, at READ COMMITTED with
default settings.
Schema:
CREATE TABLE tb_user (pk_user bigint PRIMARY KEY, name text);
CREATE TABLE tb_post (pk_post bigserial PRIMARY KEY,
fk_user bigint NOT NULL REFERENCES tb_user,
title text);
INSERT INTO tb_user SELECT g, 'u' FROM generate_series(1, 10) g;
ins.pgb (the FK check takes FOR KEY SHARE on the parent):
\set u random(1, 10)
INSERT INTO tb_post (fk_user, title) VALUES (:u, 't');
ren.pgb (a non-key update of the parent that always rolls back):
\set u random(1, 10)
BEGIN;
UPDATE tb_user SET name = md5(random()::text) WHERE pk_user = :u;
ROLLBACK;
pgbench -n -c 48 -j 8 -T 30 -f ins.pgb@8 -f ren.pgb@2
On REL_18_STABLE (a85b552), 24 cores, 43 of the 48 clients failed with
"ERROR: new multixact has more than one updating member" within 30
seconds, in each of three runs. With the heapam.c and xact.c changes of
v5 applied to the same tree: no errors over about 16 million
transactions in three runs, and no other errors. I also hit it on 18.1
and 18.4 under REPEATABLE READ.
Tested-by: Lionel Hamayon <[email protected]>
Regards,
Lionel