public inbox for [email protected]  
help / color / mirror / Atom feed
pg_dump 17 produces files incompatible with older server versions
2+ messages / 2 participants
[nested] [flat]

* pg_dump 17 produces files incompatible with older server versions
@ 2024-10-02 05:23  Sam Kidman <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Sam Kidman @ 2024-10-02 05:23 UTC (permalink / raw)
  To: [email protected]

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:

ERROR:  unrecognized configuration parameter "transaction_timeout"

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,

-- 

Sam Kidman

Web Developer

Melbourne

0498 592 582
[email protected]
www.fresho.com






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pg_dump 17 produces files incompatible with older server versions
@ 2024-10-02 18:23  Daniel Gustafsson <[email protected]>
  parent: Sam Kidman <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2024-10-02 18:23 UTC (permalink / raw)
  To: Sam Kidman <[email protected]>; +Cc: [email protected]

> On 2 Oct 2024, at 07:23, Sam Kidman <[email protected]> wrote:

> 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.

This is per design of pg_dump, the documentation states the following:

    "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."

Running the appropriate version of pg_dump for the target cluster, or applying
manual (or scripted) editing of the dump file is the option.

--
Daniel Gustafsson







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-10-02 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-10-02 05:23 pg_dump 17 produces files incompatible with older server versions Sam Kidman <[email protected]>
2024-10-02 18:23 ` Daniel Gustafsson <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox