Re: PG upgrade 14->15 fails - database contains our own extension
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Turoň <david.turon@linuxbox.cz>
Cc: Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org,
Marian Krucina <marian.krucina@linuxbox.cz>
Date: 2022-10-13T16:06:46Z
Lists: pgsql-hackers
I wrote: > Hmm ... I think it's a very ancient bug that somehow David has avoided > tripping over up to now. Looking closer, I don't see how b55f2b692 could have changed pg_dump's opinion of the order to sort these three casts in; that sort ordering logic is old enough to vote. So I'm guessing that in fact this *never* worked. Perhaps this extension has never been through pg_upgrade before, or at least not with these casts? > We might be able to put in some kluge in pg_dump to make it less > likely to fail with existing DBs, but I think the true fix lies > in adding that dependency. I don't see any painless way to fix this in pg_dump, and I'm inclined not to bother trying if it's not a regression. Better to spend the effort on the backend-side fix. On the backend side, really anyplace that we consult IsBinaryCoercible during DDL is at hazard. While there aren't a huge number of such places, there's certainly more than just CreateCast. I'm trying to decide how much trouble it's worth going to there. I could be wrong, but I think that only the cast-vs-cast case is really likely to be problematic for pg_dump, given that it dumps casts pretty early now. So it might be sufficient to fix that one case. regards, tom lane
Commits
-
Record dependencies of a cast on other casts that it requires.
- 8272749e8ca1 16.0 landed
-
Adjust pg_dump's priority ordering for casts.
- b55f2b692655 15.0 cited