Re: PG upgrade 14->15 fails - database contains our own extension - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PG upgrade 14->15 fails - database contains our own extension
Date
Msg-id 965868.1665677206@sss.pgh.pa.us
Whole thread Raw
In response to Re: PG upgrade 14->15 fails - database contains our own extension  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PG upgrade 14->15 fails - database contains our own extension  (David Turoň <david.turon@linuxbox.cz>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG upgrade 14->15 fails - database contains our own extension
Next
From: Hannu Krosing
Date:
Subject: Is anybody planning to release pglogical for v15 ?