Re: BUG #19024: Error when trying to use pg_dump of new server on old server

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: kyzevan23(at)mail(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19024: Error when trying to use pg_dump of new server on old server
Date: 2025-08-19 12:54:27
Message-ID: CALdSSPh=WprPrf4mUY-oY7W=Um3GykrGOK5sN8CBQcX6BTZyUQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 19 Aug 2025 at 16:34, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 19024
> Logged by: Egor Chindyaskin
> Email address: kyzevan23(at)mail(dot)ru
> PostgreSQL version: 17.6
> Operating system: Ubuntu 25.04
> Description:
>
> Hello, commit 6b755d8d70b2ceffeb4798cbb6907d2704c2e6c4 introduced a new bug.
> If you take the old cluster and server and try to do a pg_dump on the new
> server REL_17_STABLE (71ee96e9f95806f9f6e2c805496c0dcf25b3946a), as shown in
> the reproduction below:
>
> #!/bin/bash
> PG_OLD=REL_17_0/bin
> PG_NEW=REL_17_STABLE/bin
> $PG_OLD/initdb -D data
> $PG_OLD/pg_ctl -D data -l logfile start
> $PG_OLD/dropdb testdb > /dev/null || true
> $PG_OLD/createdb testdb
> $PG_OLD/psql -c "CREATE DOMAIN public.hstestdom1 AS integer NOT NULL DEFAULT
> 0;" testdb
> $PG_NEW/pg_dump testdb
>
> We will get the error
>
> pg_dump: error: query failed: ERROR: invalid constraint type "n"
> pg_dump: detail: Query was: EXECUTE getDomainConstraints('16386')
>
> ---
> Best regards,
> Egor Chindyaskin
> Postgres Professional: http://postgrespro.com
>

Hi!

6e79358 fixed server support for pg_get_constraintdef, so you should
use pg >= 17.3 for this test to work.
pd_dump executes queries on server, so NEW pg_dump will execute on OLD
server. We cannot change anything in 17.0 to make this example work.
So nothing need to be done for REL_17_STABLE?

--
Best regards,
Kirill Reshke

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kirill Reshke 2025-08-19 13:04:51 Re: BUG #19024: Error when trying to use pg_dump of new server on old server
Previous Message Sandeep Thakkar 2025-08-19 10:35:15 Re: PostgreSQL Windows Installer defaults to "English_United States.1252" when choosing locale starting with "English"