Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore - Mailing list pgsql-general

From Tom Lane
Subject Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Date
Msg-id 7143.1292527073@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
Adrian Klaver <adrian.klaver@gmail.com> writes:
> On 12/16/2010 08:47 AM, Andrus Moor wrote:
>>> 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. "

>> pg_restore ignores erros during restore (it only returns exit code 1).
>> So "manual editing of the dump file to remove syntax not understood" is
>> never required.
>> Why this is not mentioned in docs ?

> That begs the question what is the problem then?

The problem of course is that Andrus' statement is wrong.  There is not,
and never has been, any guarantee that pg_dump output would load into an
older server without hand-editing to adjust uses of new syntax.  Which
is exactly what the documentation says.  He's apparently only had
experience with version combinations where no editing was needed, but he
was just lucky (and pretty conservative with what DDL he used).  We have
changed the output in non-backward-compatible ways before now, and
doubtless will again in the future.  As an example, 9.0 did add OR
REPLACE to its CREATE LANGUAGE commands, but the previous output
wouldn't have worked before 8.1 anyway --- before that CREATE LANGUAGE
had to fully specify all the language's options, because there was no
pg_pltemplate.

            regards, tom lane

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Next
From: Bryan Montgomery
Date:
Subject: Re: Searching array fields - or should I redesign?