Re: [PATCH] Extend MXactCache lifetime from per-transaction to per-session

From: JoongHyuk Shin <sjh910805(at)gmail(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Extend MXactCache lifetime from per-transaction to per-session
Date: 2026-10-06 05:04:58
Message-ID: CACSdjfOYrRYAPFX-3jA7vGJRApRJM8eyWwFB+di5pD7S9i6uKw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 20, 2026 at 6:38 PM JoongHyuk Shin <sjh910805(at)gmail(dot)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

>

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message shveta malik 2026-10-06 04:55:35 Re: Persist slot invalidations before publishing them