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

2024-07-28 Thread Anton A. Melnikov
On 19.06.2024 21:06, Peter Geoghegan wrote: On Wed, Jun 19, 2024 at 1:39 PM Alvaro Herrera wrote: FWIW I don't think HEAP_XMAX_INVALID as purely a hint. HEAP_XMAX_COMMITTED is a hint, for sure, as is HEAP_XMIN_COMMITTED on its own; but as far as I recall, the INVALID flags must persist once s

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

2024-06-19 Thread Peter Geoghegan
On Wed, Jun 19, 2024 at 1:39 PM Alvaro Herrera wrote: > FWIW I don't think HEAP_XMAX_INVALID as purely a hint. > HEAP_XMAX_COMMITTED is a hint, for sure, as is HEAP_XMIN_COMMITTED on > its own; but as far as I recall, the INVALID flags must persist once > set. Seems we disagree on some pretty fun

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

2024-06-19 Thread Alvaro Herrera
On 2024-Jun-19, Peter Geoghegan wrote: > On Wed, Jun 19, 2024 at 1:00 PM Yura Sokolov wrote: > > So it is quite different code paths, and one could not be used > > to decline or justify other. > > The point is that we shouldn't need to rely on what is formally a > hint. It might be useful to use

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

2024-06-19 Thread Peter Geoghegan
On Wed, Jun 19, 2024 at 1:00 PM Yura Sokolov wrote: > So it is quite different code paths, and one could not be used > to decline or justify other. The point is that we shouldn't need to rely on what is formally a hint. It might be useful to use the hint to decide whether or not freezing now actu

Re: Don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid.

2024-06-19 Thread Alvaro Herrera
On 2024-Jun-14, Anton A. Melnikov wrote: > Hello! > > 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

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

2024-06-19 Thread Yura Sokolov
18.06.2024 18:47, Peter Geoghegan пишет: On Tue, Jun 18, 2024 at 10:29 AM Maxim Orlov 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 ch

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

2024-06-18 Thread Peter Geoghegan
On Tue, Jun 18, 2024 at 10:29 AM Maxim Orlov 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 "firs

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

2024-06-18 Thread Maxim Orlov
Hi! 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. Does anyone kno

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

2024-06-17 Thread Anton A. Melnikov
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 a

Don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid.

2024-06-14 Thread Anton A. Melnikov
Hello! 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.