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: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: Andrus Moor <eetasoft(at)online(dot)ee>, 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-16 19:17:53
Message-ID: 7143.1292527073@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bryan Montgomery 2010-12-16 20:18:20 Re: Searching array fields - or should I redesign?
Previous Message Adrian Klaver 2010-12-16 18:38:26 Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore