Re: pg_dump 17 produces files incompatible with older server versions

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Sam Kidman <sam(at)fresho(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_dump 17 produces files incompatible with older server versions
Date: 2024-10-02 18:23:14
Message-ID: 53980e64-4bac-44bb-8156-6f5e3fb27d27@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/1/24 22:23, Sam Kidman wrote:
> Hello
>
> We're developing a rails application and part of our development
> workflow involves dumping out the database schema using pg_dump, which
> is restored whenever we drop and create our development database.
>
> As of version 17 we now have SET transaction_timeout = 0 in the schema file.
>
> Unfortunately we use the latest version of the client tools (ie
> pg_dump and kin) but we run the same database server version as we use
> in production (12) and so now we're unable to import our database
> schema with the error below:

https://www.postgresql.org/docs/current/app-pgdump.html

"Also, it is not guaranteed that pg_dump's output can be loaded into a
server of an older major version — not even if the dump was taken from a
server of that version. Loading a dump file into an older server may
require manual editing of the dump file to remove syntax not understood
by the older server. "

Use the Postgres 12 version of pg_dump to dump if you want to restore to
Postgres 12 instance.

>
> ERROR: unrecognized configuration parameter "transaction_timeout"

Did the above actually stop the restore?

>
> It might be easier for us if we could configure pg_dump to _not_
> output setting runtime parameters - they're not that important for the
> use case of applying a schema to a database for local development.
>
> Are there any other solutions to this issue? It could be quite
> troublesome for us as we have a few different postgres server versions
> in use in different applications but we use the same set of client
> tools for all of them.
>
> Best,
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Gustafsson 2024-10-02 18:23:40 Re: pg_dump 17 produces files incompatible with older server versions
Previous Message David G. Johnston 2024-10-02 18:21:54 Re: pg_dump 17 produces files incompatible with older server versions