Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619
Date
Msg-id 20210516232833.qfrjcb7jgbzzpo5h@alap3.anarazel.de
Whole thread Raw
In response to Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619
List pgsql-hackers
Hi,

On 2021-05-16 18:42:53 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Why would it not be safe?
> 
> I'm just wondering about the catalog tuples set up by pg_upgrade
> itself.  If they're all frozen then they probably don't matter to
> this, but it might take some thought.

There shouldn't be any catalog objects (vs tuples) set up by pg_upgrade
at the time of the resetwal, as far as I can see. copy_xact_xlog_xid(),
which includes the resetwal calls, is done before any new objects are
created/restored.

The only thing that happens before copy_xact_xlog_xid() is
prepare_new_cluster(), which analyzes/freezes the catalog of the new
cluster. Of course that does create new stats tuples for catalog tables,
but if the freezing of those doesn't work, we'd be in deep trouble
regardless of which concrete oldestXid value we choose - that happens
with xids as they are in a freshly initdb' cluster, which might be in
the future in the old cluster, or might have aborted. Their pg_xact will
be overwritten in copy_xact_xlog_xid().

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619
Next
From: David Rowley
Date:
Subject: Re: Typo in README.barrier