Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?
Date: 2024-06-18 15:47:58
Message-ID: CAH2-WznwPKvmTv_Mo=yOfngcjX-1aus7VhjYWw9LTA5pF4o=yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 18, 2024 at 10:29 AM Maxim Orlov <orlovmg(at)gmail(dot)com> wrote:
> Maybe, I'm too bold, but looks like a kinda bug to me. At least, I don't understand why we do not check the HEAP_XMAX_INVALID flag.
> My guess is nobody noticed, that MultiXactIdIsValid call does not check the mentioned flag in the "first" condition, but it's all my speculation.

A related code path was changed in commit 02d647bbf0. That change made
the similar xmax handling that covers XIDs (not MXIDs) *stop* doing
what you're now proposing to do in the Multi path.

Why do you think this is a bug?

> Does anyone know if there are reasons to deliberately ignore the HEAP_XMAX INVALID flag? Or this is just an unfortunate oversight.

HEAP_XMAX_INVALID is just a hint.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-06-18 16:08:45 Re: Meson far from ready on Windows
Previous Message Ashutosh Sharma 2024-06-18 15:25:08 Re: Truncation of mapped catalogs (whether local or shared) leads to server crash