Re: Xmax precedes relation freeze threshold errors - Mailing list pgsql-admin

From Peter Geoghegan
Subject Re: Xmax precedes relation freeze threshold errors
Date
Msg-id CAH2-Wz=Vb_+jn9_19Ood5msM-puiNuvAggSWSWUtbve4VUYrBw@mail.gmail.com
Whole thread Raw
In response to Re: Xmax precedes relation freeze threshold errors  (Sergey Aleynikov <sergey.aleynikov@gmail.com>)
List pgsql-admin
On Tue, Jun 14, 2022 at 10:43 AM Sergey Aleynikov
<sergey.aleynikov@gmail.com> wrote:
> This instance is very unlikely to ever be promoted to master, at least
> not in the recent 5 years while it resides at it's current machine).
> The instance has been upgraded a number of times though with
> pg_upgrade, recently from 11->14.

If I had to guess, I'd guess that it is a pg_upgrade issue.

Commit 74cf7d46 from 2021-07-26 fixed an issue in pg_upgrade on all
stable branches. Prior to that commit, pg_upgrade failed to account
for the fact that pg_resetxlog/pg_resetwal carried forward a
relation's pg_class.relfrozenxid in a way that wasn't appropriate for
pg_upgrade (we should just carry forward the relfrozenxid value
without changing anything in pg_upgrade).

I wouldn't be surprised to learn that this only visibly led to
problems with one particular heap relation due to "phase of the moon"
type details tied to the specifics at the time of the upgrade. On the
other hand, I don't know what to make of the fact that it seems to
come and go. Maybe it is just an amcheck bug.

-- 
Peter Geoghegan



pgsql-admin by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: Xmax precedes relation freeze threshold errors
Next
From: Wells Oliver
Date:
Subject: Joining to views & the query planner