On Mon, Jun 12, 2017 at 5:25 PM, Andres Freund <and...@anarazel.de> wrote: > Even there I don't think that's a sane assumption *for the future*. We > just need a slight change in the rules about when a toast table is needed > - and that stuff seriously need overhauling - and it doesn't work > anymore.
The problem is that if a relfilenode ever gets assigned by GetNewRelFileNode() during a binary-upgrade restore, that OID may turn out to be used by some other object later in the dump. And then you're dead, because the dump restore will fail later on complaining about, well, I forget the error message wording exactly, but, basically, an OID collision. So if we change the rules in such a way that objects which currently lack TOAST tables acquire them, we need to first restore all of the objects *without* adding any new TOAST tables, and then at the end create any new TOAST tables once we have a complete list of the relfilenodes that are actually used. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers