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

From: "Dave Page" <dpage(at)postgresql(dot)org>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, "Stefan Schwarzer" <stefan(dot)schwarzer(at)grid(dot)unep(dot)ch>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Subject: Re: [GENERAL] Forgot to dump old data before re-installing machine
Date: 2008-01-18 19:16:39
Message-ID: 937d27e10801181116u68af7885s58d91c440a613a7e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

On 18/01/2008, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> 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 compiled with 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.

I would think not, as you almost certainly must be doing a file level
restore of the data directory to get into this state and therefore
probably want to keep your data.

/D

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-01-18 19:18:40 Re: [GENERAL] Forgot to dump old data before re-installing machine
Previous Message Peter Eisentraut 2008-01-18 19:11:57 Re: [GENERAL] Forgot to dump old data before re-installing machine

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-01-18 19:18:40 Re: [GENERAL] Forgot to dump old data before re-installing machine
Previous Message Peter Eisentraut 2008-01-18 19:11:57 Re: [GENERAL] Forgot to dump old data before re-installing machine