Subject: Re: PostgreSQL upgrade pains (was Re: down?)
To: Johnny C. Lam <>
From: Jon Buller <>
List: tech-pkg
Date: 05/17/2001 23:06:01
"Johnny C. Lam" <> wrote:

> Jon Buller <> writes:
> > 
> > It probably wouldn't be such a big deal, (provided 7.1.1 can read
> > all my 7.0.2 databases without a dump/reload)
> You actually need to do a dump and restore of your databases if
> upgrading from pre-7.1 to 7.1.x.

Yeah, figured that one out while surfing to to see
what new features I was going to be getting.  I think I have all
my data out in flat files anyway right now, so it's not a big deal
(even if I don't have it)  I won't be losing much if I do lose

> I'm wondering what can be done about this as when PosgreSQL is
> upgraded, a dump and restore is almost always required or at least
> recommended.  Perhaps we should add a DEINSTALL script that warns of
> the possible need to run pg_dumpall if the user intends to upgrade?
> It's really far too late to tell the user to dump the databases at
> pre-install time as it's currently done.  Any one else have thoughts
> on how to handle this?

I think the first thing to do is modify the makefiles to print the
output of pkg_info -R pkg_to_be_deleted just before it does the su
to get permissions to do the delete.  That would have saved my
bacon in this case, and probably a few others in the past too.
I'd look into it myself, but it's too late right now, and I've
never had much luck with makefiles more complicated than:

     foo: foo.o
       cc -o foo foo.o
     foo.o: foo.c
       cc -O2 -c foo.c

8^)  Next, a dump/restore script might be nice, but I really fear
that it would botch the job in some odd case.  (10GB of data on an
18GB drive, with no room for the whole dump, anyone?) It's probably
better to just raise some big red flags and say "Are you really,
REALLY sure?" than to try to get the upgrade right all the time,
in every situation.  I'm not sure I'd trust such a script anyway
if I had real data.  Then again, if I had real data, I'd probably
have a backup of it too. 8^)

I really need to get my PC532 back up so I can see if PostgreSQL
needs any new NS32K tweaks since I re-did the TAS for (oh, when
was that?) 6.4(?)