Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function
Date
Msg-id f8343690-5d65-2473-479e-005cc0d98af3@dunslane.net
Whole thread Raw
In response to Regression on pg_restore to 16.0: DOMAIN not available to SQL function  (Mark Hills <mark@xwax.org>)
List pgsql-hackers
On 2023-11-03 Fr 06:17, Mark Hills wrote:
> I'm having errors restoring with pg_restore to v16.0, it appears to be a
> regression or bug. The same file restored to v15.4 without problem.
>
> During the restore:
>
>    pg_restore: error: could not execute query: ERROR:  type "hash" does not exist
>    LINE 7:         )::hash;
>    [...]
>    CONTEXT:  SQL function "gen_hash" during inlining
>
> It prompted me to separate the restore into steps:
>
> * An initial "--schema-only" completes
> * The "--data-only" when the error takes place
>
> I also double-checked for no mismatch of client/server etc.
>
> For now, I can use 15.4 for this one-off task so will have to kick this
> can down the road.
>
> But I think it worth reporting that something in 16.0 appears to be
> failing on valid data (or maybe there is an incompatibility with a dump
> from 13.5?)


In general you should use pg_dump from the version you want to restore 
into. Dumps from earlier versions might work in some cases, but there is 
no guarantee.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Nisha Moond
Date:
Subject: Re: Intermittent failure with t/003_logical_slots.pl test on windows
Next
From: Shlok Kyal
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER