Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus Moor" <eetasoft(at)online(dot)ee>
Cc: adrian(dot)klaver(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Date: 2010-12-15 15:21:43
Message-ID: 5965.1292426503@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus Moor" <eetasoft(at)online(dot)ee> writes:
> I used only 9.0 dump and restore. I did the following:

> 1. Created backup copy from 8.4.3 using 9.0 pg_dump
> 2. Restored from this backup to 8.4.3 using 9.0 pg_restore

> 9.0 pg_restore fails since 8.4.3 server reports invalid sql command in
> create
> language plpgsql statement. previous pg_restores worked OK.
> Is this 9.0 pg_restore bug ?

No, this is just pilot error. Any version of pg_dump will produce
output that is meant to be loaded into the matching server version
(or a later version). If you are intending to load back into 8.4,
use the 8.4 pg_dump.

You may have been reading the recommendation to use the later version's
pg_dump when dumping an older server to perform an upgrade. It's good
advice, but only for upgrades.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrus Moor 2010-12-15 15:34:34 Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Previous Message Peter Geoghegan 2010-12-15 15:20:08 Re: Linux: PAE or x64