Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Mark Hills <mark(at)xwax(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function
Date: 2023-11-03 11:39:57
Message-ID: f8343690-5d65-2473-479e-005cc0d98af3@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2023-11-03 12:28:28 Re: [PoC] Federated Authn/z with OAUTHBEARER
Previous Message Nisha Moond 2023-11-03 11:32:44 Re: Intermittent failure with t/003_logical_slots.pl test on windows