pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_dump / pg_restore version confusion
4+ messages / 3 participants
[nested] [flat]

* pg_dump / pg_restore version confusion
@ 2020-07-29 10:53 Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
  2020-07-29 11:49 ` Re: pg_dump / pg_restore version confusion Bruce Momjian <bruce@momjian.us>
  2020-07-29 13:44 ` Re: pg_dump / pg_restore version confusion Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Zwettler Markus (OIZ) @ 2020-07-29 10:53 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

Hi,

An external supplier had a postgres v9.5 database which he dumped with a pg_dump v12 client in custom format using PgAdmin4.

Would a pg_restore with a v12 client into a postgres v9.6 database work and be officially supported?

Thanks, Markus

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

* Re: pg_dump / pg_restore version confusion
  2020-07-29 10:53 pg_dump / pg_restore version confusion Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
@ 2020-07-29 11:49 ` Bruce Momjian <bruce@momjian.us>
  2020-07-29 12:54   ` Re: pg_dump / pg_restore version confusion Bruce Momjian <bruce@momjian.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Bruce Momjian @ 2020-07-29 11:49 UTC (permalink / raw)
  To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

On Wed, Jul 29, 2020 at 10:53:34AM +0000, Zwettler Markus (OIZ) wrote:
> Hi,
> 
>  
> 
> An external supplier had a postgres v9.5 database which he dumped with a
> pg_dump v12 client in custom format using PgAdmin4.
> 
>  
> 
> Would a pg_restore with a v12 client into a postgres v9.6 database work and be
> officially supported?

Yes, you can always use a newer pg_dump on an older database, though the
reverse is not recommended.  In fact, if you are upgrading to PG 12, it
is recommended to use pg_dump v12 to dump a Postgres database from an
earlier version.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






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

* Re: pg_dump / pg_restore version confusion
  2020-07-29 10:53 pg_dump / pg_restore version confusion Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
  2020-07-29 11:49 ` Re: pg_dump / pg_restore version confusion Bruce Momjian <bruce@momjian.us>
@ 2020-07-29 12:54   ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2020-07-29 12:54 UTC (permalink / raw)
  To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

On Wed, Jul 29, 2020 at 12:33:56PM +0000, Zwettler Markus (OIZ) wrote:
> And I can also do this restore:
> 
> <quote>
> Would a pg_restore with a v12 client into a postgres v9.6 database work and be officially supported?
> </quote>

Uh, good question.  You should still use the version of pg_restore that
you are loading _into_, not what you dumped from.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






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

* Re: pg_dump / pg_restore version confusion
  2020-07-29 10:53 pg_dump / pg_restore version confusion Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
@ 2020-07-29 13:44 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Adrian Klaver @ 2020-07-29 13:44 UTC (permalink / raw)
  To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; pgsql-general <pgsql-general@lists.postgresql.org>

On 7/29/20 3:53 AM, Zwettler Markus (OIZ) wrote:
> Hi,
> 
> An external supplier had a postgres v9.5 database which he dumped with a 
> pg_dump v12 client in custom format using PgAdmin4.
> 
> Would a pg_restore with a v12 client into a postgres v9.6 database work 
> and be officially supported?

The best that could be said is it may work.

Officially supported :

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

"Because pg_dump is used to transfer data to newer versions of 
PostgreSQL, the output of pg_dump can be expected to load into 
PostgreSQL server versions newer than pg_dump's version. pg_dump can 
also dump from PostgreSQL servers older than its own version. 
(Currently, servers back to version 8.0 are supported.) However, pg_dump 
cannot dump from PostgreSQL servers newer than its own major version; it 
will refuse to even try, rather than risk making an invalid dump. 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. "




> 
> Thanks, Markus
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





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


end of thread, other threads:[~2020-07-29 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 10:53 pg_dump / pg_restore version confusion Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2020-07-29 11:49 ` Bruce Momjian <bruce@momjian.us>
2020-07-29 12:54   ` Bruce Momjian <bruce@momjian.us>
2020-07-29 13:44 ` Adrian Klaver <adrian.klaver@aklaver.com>

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