pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_dump from older version and pg_restore in newer
6+ messages / 4 participants
[nested] [flat]

* pg_dump from older version and pg_restore in newer
@ 2015-01-18 10:25  Perry, Hemy <hemy_perry@mentor.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Perry, Hemy @ 2015-01-18 10:25 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I am planning  a migration from 9.1.7 to 9.4.0.
On many threads I noticed that the recommendation is "Be sure to use pg_dump from the *new* version to take the dump from the old database."

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

Regards
Hemy

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

* Re: pg_dump from older version and pg_restore in newer
@ 2015-01-18 11:03  Shreeyansh dba <shreeyansh2014@gmail.com>
  parent: Perry, Hemy <hemy_perry@mentor.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Shreeyansh dba @ 2015-01-18 11:03 UTC (permalink / raw)
  To: Perry, Hemy <hemy_perry@mentor.com>; +Cc: pgsql-admin

On Sun, Jan 18, 2015 at 3:55 PM, Perry, Hemy <hemy_perry@mentor.com> wrote:

>  Hi,
>
>
>
> I am planning  a migration from 9.1.7 to 9.4.0.
>
> On many threads I noticed that the recommendation is “Be sure to use
> pg_dump from the *new* version to take the dump from the old database.”
>
>
>
> Is that a must?
>
> Is there a chance that a restore using new version will fail because the
> dump was taken with **old** bin?
>
>
>
> Regards
>
> Hemy
>
>
>
>
>
Hi Hemy,

Using of new version dump is not a must. You can use dump of Older
version(9.1.7) and use restore of New version(9.4.0)

Using restore of new version will not fail because the dump was taken with *
*old** bin.

This can fail only if you give any wrong syntax in command.


Hope this clears your issue.


-
*Thanks & Regards,*
*Venkataramana Aitla*
*Database Administrator*
*www.shreeyansh.com <http://www.shreeyansh.com>*

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

* Re: pg_dump from older version and pg_restore in newer
@ 2015-01-18 11:07  Perry, Hemy <hemy_perry@mentor.com>
  parent: Shreeyansh dba <shreeyansh2014@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Perry, Hemy @ 2015-01-18 11:07 UTC (permalink / raw)
  To: Shreeyansh dba <shreeyansh2014@gmail.com>; +Cc: pgsql-admin

Aitla, thank you very much for the prompt reply!
The fact that I saw this sentence “Be sure to use pg_dump from the *new* version to take the dump from the old database.” more than once made me wonder if I am not missing something.
Thanks
Hemy


From: Shreeyansh dba [mailto:shreeyansh2014@gmail.com]
Sent: 18 January 2015 13:03
To: Perry, Hemy
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] pg_dump from older version and pg_restore in newer



On Sun, Jan 18, 2015 at 3:55 PM, Perry, Hemy <hemy_perry@mentor.com<mailto:hemy_perry@mentor.com>> wrote:
Hi,

I am planning  a migration from 9.1.7 to 9.4.0.
On many threads I noticed that the recommendation is “Be sure to use pg_dump from the *new* version to take the dump from the old database.”

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

Regards
Hemy


Hi Hemy,

Using of new version dump is not a must. You can use dump of Older version(9.1.7) and use restore of New version(9.4.0)

Using restore of new version will not fail because the dump was taken with *old* bin.

This can fail only if you give any wrong syntax in command.


Hope this clears your issue.


-
Thanks & Regards,
Venkataramana Aitla
Database Administrator
www.shreeyansh.com<http://www.shreeyansh.com;


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

* Re: pg_dump from older version and pg_restore in newer
@ 2015-01-18 15:46  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Perry, Hemy <hemy_perry@mentor.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Scott Ribe @ 2015-01-18 15:46 UTC (permalink / raw)
  To: pgsql-admin

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.

-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice






-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



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

* Re: pg_dump from older version and pg_restore in newer
@ 2015-01-18 19:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2015-01-18 19:26 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-admin; hemy_perry@mentor.com

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


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



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

* Re: pg_dump from older version and pg_restore in newer
@ 2015-01-18 21:42  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Scott Ribe @ 2015-01-18 21:42 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin; hemy_perry@mentor.com

On Jan 18, 2015, at 12:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> 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...

Yep. I didn't want to say it out loud in the prior post, but I don't think I have ever actually used the new dump on the old db. Then again, I'm almost never more than 1 point release behind, so my way of doing things is not generally applicable ;-)


-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice






-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



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


end of thread, other threads:[~2015-01-18 21:42 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-01-18 10:25 pg_dump from older version and pg_restore in newer Perry, Hemy <hemy_perry@mentor.com>
2015-01-18 11:03 ` Shreeyansh dba <shreeyansh2014@gmail.com>
2015-01-18 11:07   ` Perry, Hemy <hemy_perry@mentor.com>
2015-01-18 15:46 ` Scott Ribe <scott_ribe@elevated-dev.com>
2015-01-18 19:26   ` Tom Lane <tgl@sss.pgh.pa.us>
2015-01-18 21:42     ` Scott Ribe <scott_ribe@elevated-dev.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