Re: 8.4 Data Not Compatible with 9.0.1 Upgrade?

Поиск
Список
Период
Сортировка
От Leif Biberg Kristensen
Тема Re: 8.4 Data Not Compatible with 9.0.1 Upgrade?
Дата
Msg-id 201011022250.16427.leif@solumslekt.org
обсуждение исходный текст
Ответ на Re: 8.4 Data Not Compatible with 9.0.1 Upgrade?  (Carlos Mennens <carlos.mennens@gmail.com>)
Список pgsql-general
On Tuesday 2. November 2010 22.37.33 Carlos Mennens wrote:
> On Tue, Nov 2, 2010 at 10:53 AM, Steve Clark <sclark@netwolves.com> wrote:
> > mv /var/lib/postgres/data  /var/lib/postgres/data.old
>
> Before I move or rename '/var/lib/postgres/data', what version of
> PostgreSQL should I be at? 8.4 or 9.0?

You should be at 9.0. The important thing is that you must start the new
installation initdb with an empty  data directory, or you'll inevitably get
the complaints about incompatibility with the old files. It's quite logical,
really, if you think about it.

> > You will then have to do an initdb to create the basic 9.x databases.
> > You can then use psql or pg_restore depending on how you dumped
> > your data to restore your databases.
>
> I simply ran the following command:
>
> /usr/bin/pg_dump finance > finance.sql

That's only the first part of the upgrade process. Then you must prepare an
empty directory to acommodate your data, do an initdb, and then populate the
new directory from your dump file.

I think that the Gentoo method works great: In the /var/lib/postgres
directory, we just create a new subirectory named /8.3, /8.4, /9.0, and so on,
and then a new /data directory under each one. That way, you can safely remove
the old data when you've confirmed that the new version actually works.

regards,
Leif B. Kristensen

В списке pgsql-general по дате отправления:

Предыдущее
От: Carlos Mennens
Дата:
Сообщение: Re: 8.4 Data Not Compatible with 9.0.1 Upgrade?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: 8.4 Data Not Compatible with 9.0.1 Upgrade?