Re: FreezeLimit underflows in pg14 and 15 causing incorrect behavior in heap_prepare_freeze_tuple

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FreezeLimit underflows in pg14 and 15 causing incorrect behavior in heap_prepare_freeze_tuple
Date: 2024-06-22 14:53:31
Message-ID: CAH2-Wz=Otn00RktbpSE73R0-AKZwzU0ASSh7wwuSHK4JDbJE3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 22, 2024 at 10:43 AM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
> Hmm. So perhaps this subtraction results in the desired behavior for
> freeze limit -- but by using FreezeLimit as the cutoff_xid for
> heap_prepare_freeze_tuple(), you can still end up considering freezing
> tuples with xmax older than OldestXmin.

Using a FreezeLimit > OldestXmin is just wrong. I don't think that
that even needs to be discussed.

> This results in erroring out with "cannot freeze committed xmax" on 16
> and master but not erroring out like this in 14 and 15 for the same
> tuple and cutoff values.

I don't follow. I thought that 16 and master don't have this
particular problem? Later versions don't use safeLimit as FreezeLimit
like this.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2024-06-22 15:00:01 Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
Previous Message Tom Lane 2024-06-22 14:43:53 Re: New standby_slot_names GUC in PG 17