Re: [GENERAL] Forgot to dump old data before re-installing machine

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [GENERAL] Forgot to dump old data before re-installing machine
Дата
Msg-id 200801182011.59549.peter_e@gmx.net
обсуждение исходный текст
Ответы Re: [GENERAL] Forgot to dump old data before re-installing machine  ("Dave Page" <dpage@postgresql.org>)
Re: [GENERAL] Forgot to dump old data before re-installing machine  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> What would work better is to add some code that checks whether
> pg_control_version looks like the byte-swap of a small number,
> and prints a suitably modified error message if so.

Here is a possible patch.  Example output:

$ pg-install/bin/postgres -D pg-install/var/data
FATAL:  database files are incompatible with server
DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 1090715648 (0x41030000), but the server was
compiledwith PG_CONTROL_VERSION 833 (0x00000341). 
HINT:  This could be a mismatched byte order.  It looks like you need to initdb.

I didn't follow how the user got into this mess, so I don't know whether the
suggestion "you need to initdb" is appropriate.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [HACKERS] SSL over Unix-domain sockets
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: [GENERAL] Forgot to dump old data before re-installing machine