From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Subject: | Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619 |
Date: | 2021-05-16 22:35:13 |
Message-ID: | 20210516223513.outnhdfibafroqc4@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2021-05-16 18:21:21 -0400, Tom Lane wrote:
> Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> > On Sun, May 16, 2021 at 1:23 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> And the reason oldestXID contains that is that pg_upgrade applied
> >> pg_resetwal, which does this:
> >> * For the moment, just set oldestXid to a value that will force
> >> * immediate autovacuum-for-wraparound.
>
> > This same pg_resetwal code has probably caused quite a few problems on
> > pg_upgrade'd databases:
> > https://postgr.es/m/20210423234256.hwopuftipdmp3okf@alap3.anarazel.de
>
> Hm, yeah. I'm not sure if transferring the value forward from the
> old cluster is entirely safe, but if it is, that seems like a
> promising route to a fix. (We should still have more sanity checking
> around the GlobalVis code, though.)
Why would it not be safe? Or at least safer than what we're doing right
now? It definitely isn't safe to use a newer value than what the old
cluster used - tables might have older tuples. And an older value than
the old cluster's means that we can either accidentally wrap around
without being protected or that a cluster might shut down to prevent a
wraparound. And after the pg_resetwal we can't assign xids that are
older than set_xid - so it won't become inaccurate?
I think we should remove the heuristic thing from pg_resetwal entirely,
and error out if next-xid is set to something too far away from oldest
xid, unless oldexid is also specified.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-05-16 22:42:53 | Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619 |
Previous Message | Andres Freund | 2021-05-16 22:27:48 | Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619 |