Re: Hmmm 8.1 pg_dumpall cannot dump older db's? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Hmmm 8.1 pg_dumpall cannot dump older db's?
Date
Msg-id 7540.1120794284@sss.pgh.pa.us
Whole thread Raw
In response to Re: Hmmm 8.1 pg_dumpall cannot dump older db's?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: Hmmm 8.1 pg_dumpall cannot dump older db's?
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> Ooops :-(  Seems like maybe we want it to try postgres and then fall
>> back to trying template1?

> Actually, also ONLY assume postgres is a special database if the backend 
> is 8.1 or higher.  We don't want to mess with poor people who have 
> already created a database called 'postgres' in their installation of 
> 7.4, say...

No, because it's special anyway where the dump will be reloaded.  Keep
in mind that the design assumption for pg_dump(all) is always that the
destination database will be current release or higher; frequently the
dump file won't even be parseable by older servers.

The thing that makes this slightly painful is that we can't tell what
version we are dumping *from* until we've connected, and so we cannot
automagically "do the right thing" here.  I don't really see any other
way to do it than the try-and-fallback approach.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Hmmm 8.1 pg_dumpall cannot dump older db's?
Next
From: Tom Lane
Date:
Subject: Re: Checkpoint cost, looks like it is WAL/CRC