Re: pg_dump from older version and pg_restore in newer - Mailing list pgsql-admin

From Tom Lane
Subject Re: pg_dump from older version and pg_restore in newer
Date
Msg-id 6397.1421609191@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump from older version and pg_restore in newer  (Scott Ribe <scott_ribe@elevated-dev.com>)
Responses Re: pg_dump from older version and pg_restore in newer
List pgsql-admin
Scott Ribe <scott_ribe@elevated-dev.com> writes:
> On Jan 18, 2015, at 3:25 AM, Perry, Hemy <hemy_perry@mentor.com> wrote:
>> Is that a must?

> No. Just a good precaution.

>> Is there a chance that a restore using new version will fail because the dump was taken with *old* bin?

> Yes.

In principle, ie in the absence of bugs, it should work either way.

The reason for the standard recommendation to use the newer version's
pg_dump is the possibility that your old pg_dump contains bugs that have
been fixed in the newer version.  This is a non-negligible risk when
you're talking about a pg_dump that's several years old, as 9.1.7 is.
If you were comparing minor releases of similar date, eg 9.1.14 versus
9.4.0, the risk calculation might shift the other way (since 9.1.14 would
contain back-patches for any old bugs recently identified, but 9.4.0 might
contain new bugs all its very own).

If you're worried about compatibility issues, a reasonably quick and
reliable way of pre-testing is to do a "pg_dump -s" (schema only) and
see if that loads into the new version without issues.

            regards, tom lane


pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: Re: pg_dump from older version and pg_restore in newer
Next
From: Scott Ribe
Date:
Subject: Re: pg_dump from older version and pg_restore in newer