Should pg_dump refuse to run if DB has different version? - Mailing list pgsql-hackers

From Tom Lane
Subject Should pg_dump refuse to run if DB has different version?
Date
Msg-id 25256.954787703@sss.pgh.pa.us
Whole thread Raw
Responses Re: Should pg_dump refuse to run if DB has different version?  (The Hermit Hacker <scrappy@hub.org>)
Re: Should pg_dump refuse to run if DB has different version?  (Alfred Perlstein <bright@wintelcom.net>)
List pgsql-hackers
If you run 6.5 pg_dump against a 7.0 database, or vice versa,
you get very obscure error messages:parseNumericArray: too many numbersgetInherits(): SELECT failed.  Explanation from
backend:'ERROR:  Attribute 'inhrel' not found
 
(Quick, guess which is which ... you'll probably guess wrong.)

It's too late to do anything about the behavior of 6.5 pg_dump,
but we could change 7.0 and later pg_dump to check the database
version at startup and refuse to run if it's not the expected value.

A downside is that a pg_dump might refuse to dump a DB that it actually
would work with; that could be a pain in the neck, particularly in
development scenarios where you might not have kept the previous
compilation of pg_dump lying around.  Yet I think I prefer that to the
risk of an insidious incompatibility that causes pg_dump to run without
complaint yet generate a bogus dump.

Comments anyone?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Wenjin Zheng
Date:
Subject: Problem with view
Next
From: The Hermit Hacker
Date:
Subject: Re: Should pg_dump refuse to run if DB has different version?