Re: pg_dump from older version and pg_restore in newer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>, hemy_perry(at)mentor(dot)com
Subject: Re: pg_dump from older version and pg_restore in newer
Date: 2015-01-18 19:26:31
Message-ID: 6397.1421609191@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Ribe <scott_ribe(at)elevated-dev(dot)com> writes:
> On Jan 18, 2015, at 3:25 AM, Perry, Hemy <hemy_perry(at)mentor(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2015-01-18 21:42:37 Re: pg_dump from older version and pg_restore in newer
Previous Message Scott Ribe 2015-01-18 15:46:58 Re: pg_dump from older version and pg_restore in newer