| From: | Lionel Hamayon <lionel(dot)hamayon(at)evolution-digitale(dot)fr> |
|---|---|
| To: | Chee Wooson <wuqi(at)vastdata(dot)com(dot)cn> |
| Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "chee(dot)wooson" <chee(dot)wooson(at)gmail(dot)com> |
| Subject: | Re: [PATCH] Discard aborted updaters when expanding a multixact |
| Date: | 2026-10-10 18:34:43 |
| Message-ID: | f5a1d2fb96831f085de71288c66acfab@evolution-digitale.fr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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(dot)pgb(at)8 -f ren(dot)pgb(at)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 <lionel(dot)hamayon(at)evolution-digitale(dot)fr>
Regards,
Lionel
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 2026-10-10 19:45:19 | Re: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY) |
| Previous Message | Tom Lane | 2026-10-10 18:02:04 | Re: Policy for Abandoned Extensions |