Re: [PATCH] Extend MXactCache lifetime from per-transaction to per-session - Mailing list pgsql-hackers

From JoongHyuk Shin
Subject Re: [PATCH] Extend MXactCache lifetime from per-transaction to per-session
Date
Msg-id CACSdjfOYrRYAPFX-3jA7vGJRApRJM8eyWwFB+di5pD7S9i6uKw@mail.gmail.com
Whole thread
In response to [PATCH] Extend MXactCache lifetime from per-transaction to per-session  (JoongHyuk Shin <sjh910805@gmail.com>)
List pgsql-hackers
On Mon, Apr 20, 2026 at 6:38 PM JoongHyuk Shin <sjh910805@gmail.com> wrote:
> Since MultiXact member lists are immutable once created, cached entries
> stay valid regardless of transaction boundaries.

MultiXactIds are assigned again after wraparound, so a backend that
stays connected across a wraparound can still hold a cache entry for an
old MultiXactId. If that backend then looks up a new MultiXact that
received the same MultiXactId, it may get the old member list back.

I think the patch needs additional design work to handle this case, and
after fixing that it would also need measurements showing a real
performance gain. So for now I have marked the CF entry as Withdrawn.

-- 
JoongHyuk Shin

pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Persist slot invalidations before publishing them
Next
From: jian he
Date:
Subject: should pg_dumpall --clean apply to database in --exclude-database