Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid? - Mailing list pgsql-hackers

From Anton A. Melnikov
Subject Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?
Date
Msg-id fc43dd15-564b-4239-bc78-d0cc47b114d7@postgrespro.ru
Whole thread Raw
In response to Don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid.  ("Anton A. Melnikov" <a.melnikov@postgrespro.ru>)
Responses Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?
List pgsql-hackers
On 14.06.2024 10:45, Anton A. Melnikov wrote:

> The src/backend/access/heap/README.tuplock says about HEAP_XMAX_INVALID bit
> that "Any tuple with this bit set does not have a valid value stored in XMAX."
> 
> Found that FreezeMultiXactId() tries to process such an invalid multi xmax
> and may looks for an update xid in the pg_multixact for it.
> 
> Maybe not do this work in FreezeMultiXactId() and exit immediately if the
> bit HEAP_XMAX_INVALID was already set?
> 

Seems it is important to save the check that multi xmax is not behind relminmxid.
So saved it and correct README.tuplock accordingly.

Would be glad if someone take a look at the patch attached.


With the best regards,

-- 
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: "Erica Zhang"
Date:
Subject: Re:Re: Add support to TLS 1.3 cipher suites and curves lists
Next
From: "Euler Taveira"
Date:
Subject: Re: State of pg_createsubscriber