On Thu, Dec 11, 2025 at 12:49 AM Heikki Linnakangas <[email protected]> wrote:
>
> On 09/12/2025 14:00, Heikki Linnakangas wrote:
> > 1. Currently, at multixid wraparound, MultiXactState->nextMXact goes to
> > 0, which is invalid. All the readers must be prepared for that, and skip
> > over the 0. That's error-prone, we've already missed that a few times.
> > Let's change things so that the code that *writes* MultiXactState-
> >  >nextMXact skips over the zero already.
>
> Here's a patch for that. Does anyone see a problem with this?

The patch looks fine to me. It simplifies readers without affecting
writers much. I was expecting more explanation of why it wasn't done
that way to start with and why is it safe to do so (now, if
applicable). There must be a reason why we chose to make readers
handle invalid mxid instead of writers writing one. If it's for
performance reasons then does the new arrangement cause any
regression? If it's for safety reasons, are we fixing one set of
problems but introducing a new set. I was expecting commit message to
answer those questions.

-- 
Best Wishes,
Ashutosh Bapat


Reply via email to