Re: corrupt db

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: corrupt db
Дата
Msg-id 407d949e0911031602v49312178t170f491a2d16f9dc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: corrupt db  (Michael Wood <esiotrot@gmail.com>)
Список pgsql-novice
On Tue, Nov 3, 2009 at 6:38 PM, Michael Wood <esiotrot@gmail.com> wrote:
> 2009/11/3 Lars Gustafsson <gumse@mac.com>:
>> A client of mine hade a HD crash, he had a backup of his pgsql/data catalog,
>> but when trying to start the server (on a newly installed postgres, same
>> version he had) I get the following message:
>>
>> postgres$ FATAL:  database files are incompatible with server
>> DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION
>> 906166272, but the server was compiled with PG_CONTROL_VERSION 822.
>> HINT:  It looks like you need to initdb.
>>
>>
>> Is it beyond repair ? Any last resorts ?
>
> This might not be it, but make sure you're using a 32 bit version of
> Postgres if the old server was 32 bits, and a 64 bit version if the
> old server was 64 bit.

Close. In this case he's switching from a little-endian machine to
big-endian or vice versa. 906166272 is 0x36030000 and 822 is
0x00000336. Notice that the bytes are reversed. I think later versions
check for this and print a more specific error message.

The database is probably fine but the on-disk files are
architecture-specific. You must put it on a machine with a very
similar architecture.

--
greg

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

Предыдущее
От: Michael Lush
Дата:
Сообщение: Determining database status
Следующее
От: Don Fox
Дата:
Сообщение: Re: Install problems for postgresql-8.4.1