Re: Should pg_dump refuse to run if DB has different version?

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should pg_dump refuse to run if DB has different version?
Date: 2000-04-03 19:02:31
Message-ID: Pine.BSF.4.21.0004031601260.289-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 3 Apr 2000, Tom Lane wrote:

> If you run 6.5 pg_dump against a 7.0 database, or vice versa,
> you get very obscure error messages:
> parseNumericArray: too many numbers
> getInherits(): 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?

Sounds reasonable to me ...

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alfred Perlstein 2000-04-03 19:32:51 Re: Should pg_dump refuse to run if DB has different version?
Previous Message Tom Lane 2000-04-03 18:48:23 Should pg_dump refuse to run if DB has different version?