Thread: Upgrading to 7.2

Upgrading to 7.2

From
Francisco Reyes
Date:
Quick question.
Does initdb deletes the old database?

I will be upgrading shortly to 7.2 and the steps will be:
pg_dumpall from 7.13
install 7.2
initdb
psql to read old data

I am wondering if initdb will delete the old data or if it is safer to
blow away the data from the directories.



Re: Upgrading to 7.2

From
Tom Lane
Date:
Francisco Reyes <lists@natserv.com> writes:
> Does initdb deletes the old database?

initdb will refuse to overwrite a non-empty directory.

If you have the disk space, I'd recommend renaming the old $PGDATA
directory out of the way, so you'll have it in case something goes
disastrously wrong.  Otherwise, remove it.

            regards, tom lane

Re: Upgrading to 7.2

From
Francisco Reyes
Date:
On Fri, 15 Feb 2002, Tom Lane wrote:

> Francisco Reyes <lists@natserv.com> writes:
> > Does initdb deletes the old database?
>
> initdb will refuse to overwrite a non-empty directory.

Thanks. Just blew it away.

> If you have the disk space, I'd recommend renaming the old $PGDATA
> directory out of the way, so you'll have it in case something goes
> disastrously wrong.  Otherwise, remove it.
>             regards, tom lane

I actually have a "production" and a "test" machine. I am doing this on
the test machine first, copying the data from the production machine.
If all goes well then I do the production machine. This way I have a
working database server during the upgrade (we will also point the clients
to the test machine while we upgrade the production machine).