Обсуждение: Upgrade 7.2 to 7.3

Поиск
Список
Период
Сортировка

Upgrade 7.2 to 7.3

От
James Williams
Дата:
A while ago, I played around a bit with PostgreSQL 7.2 and created a
test database (think it was called mydb).

Since then I've upgraded Linux and it also upgraded PostgreSQL to 7.3.
Now I'm ready to start doing some proper stuff but I can't start the
postmaster. It says I need to upgrade my database, but I don't care
about the old database.

Is there any way I can remove the old database and start working with 7.3?

Thanks,
James


Re: Upgrade 7.2 to 7.3

От
Tom Lane
Дата:
James Williams <jw11@iprimus.com.au> writes:
> It says I need to upgrade my database, but I don't care
> about the old database.
> Is there any way I can remove the old database and start working with 7.3?

    rm -rf $PGDATA
    initdb
    start postmaster

If you did any customization of the postgres config files, you might
want to save your old copies before blowing them away.  Otherwise there
is nothing you need under $PGDATA.

            regards, tom lane

Re: Upgrade 7.2 to 7.3

От
Bruno Wolff III
Дата:
On Sat, Aug 09, 2003 at 23:00:19 +1000,
  James Williams <jw11@iprimus.com.au> wrote:
> A while ago, I played around a bit with PostgreSQL 7.2 and created a
> test database (think it was called mydb).
>
> Since then I've upgraded Linux and it also upgraded PostgreSQL to 7.3.
> Now I'm ready to start doing some proper stuff but I can't start the
> postmaster. It says I need to upgrade my database, but I don't care
> about the old database.
>
> Is there any way I can remove the old database and start working with 7.3?

You can delete the contents of the data directory and do an initdb.
You might want to save the config files before doing the delete so that
you can copy them back after the initdb. (Though I think the syntax
for the hba config file changed between 7.2 and 7.3, so it should need
to be tweaked in any case.)

Re: Upgrade 7.2 to 7.3

От
James Williams
Дата:
Tom Lane wrote:

>    rm -rf $PGDATA
>    initdb
>    start postmaster
>
>
>
Thanks Tom:-) That did it.
The only thing I found is that I had to be logged in as 'postgres'
first. $PGDATA doesn't seem to be defined for other users.

James