pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Server format and recovery
5+ messages / 3 participants
[nested] [flat]

* Server format and recovery
@ 2008-04-25 01:17 Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  2008-04-25 14:03 ` Re: Server format and recovery Shane Ambler <pgsql@Sheeky.Biz>
  0 siblings, 1 reply; 5+ messages in thread

From: Márcio Aguiar Ribeiro @ 2008-04-25 01:17 UTC (permalink / raw)
  To: pgsql-admin

Hello all,

I just spent 4 days trying to recover a postgres database from a
server disaster without success.

A "buggy" file just erased all the HD of the server. We were able to
recover almost all files, so I re-installed Ubuntu and Postgres 8.2.

After that, I thought I would be able to just copy my PGDATA folder
from the recovered files to the server and then run the postgres
server, but my pg_control file was not valid. So I executed
pg_resetxlog . When I attempted to run the server again I received the
following error:

"FATAL:  database files are incompatible with server
The database cluster was initialized with MAXALIGN 0, but the server
waas compiled with MAXALIGN 4." (translated from my language to
english by me)

Since this, I already tried several ways to recover the data. I
started a new DB with initdb and copied the base/ and global/ data to
the PGDATA, but there's no use.
I'm able to psql my database, but when try a "select * from pg_tables"
i receive:

"ERROR:  unexpected chunk size 1986 in chunk 0 for toast value 10319"

In other attempts I also received:

"array size exceeds the maximum allowed"

I out of ideas right now, so I'm asking your help.

Any suggestions?

Thanks!

-- 
Marcio Aguiar Ribeiro



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Server format and recovery
  2008-04-25 01:17 Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
@ 2008-04-25 14:03 ` Shane Ambler <pgsql@Sheeky.Biz>
  2008-04-25 14:51   ` Re: Server format and recovery Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Shane Ambler @ 2008-04-25 14:03 UTC (permalink / raw)
  To: Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>; +Cc: pgsql-admin

Márcio Aguiar Ribeiro wrote:
> recover almost all files, so I re-installed Ubuntu and Postgres 8.2.

> pg_resetxlog . When I attempted to run the server again I received the
> following error:
> 
> "FATAL:  database files are incompatible with server
> The database cluster was initialized with MAXALIGN 0, but the server
> waas compiled with MAXALIGN 4." (translated from my language to
> english by me)

Basically the server you are running now is unable to read the data 
files you have. This is to do with the way the postgresql binaries have 
been compiled.

My first guess is that the new postgresql binaries are 64 bit but the 
old install was 32 bit. (I don't actually know the conditions for the 
MAXALIGN value)

Have you reinstalled the same version of ubuntu? (and postgresql) I am 
assuming it is on the same hardware.

Did you get the same postgresql package or did you build from source?
If you built from source before you need to assign the same ./configure 
options as you did previously.




-- 

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Server format and recovery
  2008-04-25 01:17 Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  2008-04-25 14:03 ` Re: Server format and recovery Shane Ambler <pgsql@Sheeky.Biz>
@ 2008-04-25 14:51   ` Tom Lane <tgl@sss.pgh.pa.us>
  2008-04-25 15:39     ` Re: Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2008-04-25 14:51 UTC (permalink / raw)
  To: Shane Ambler <pgsql@Sheeky.Biz>; +Cc: Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>; pgsql-admin

Shane Ambler <pgsql@Sheeky.Biz> writes:
> Márcio Aguiar Ribeiro wrote:
>> "FATAL:  database files are incompatible with server
>> The database cluster was initialized with MAXALIGN 0, but the server
>> waas compiled with MAXALIGN 4." (translated from my language to
>> english by me)

> My first guess is that the new postgresql binaries are 64 bit but the 
> old install was 32 bit. (I don't actually know the conditions for the 
> MAXALIGN value)

That's what I'm guessing too; see the previous report here:

http://archives.postgresql.org/pgsql-admin/2007-12/msg00254.php
http://archives.postgresql.org/pgsql-admin/2008-01/msg00023.php

The symptoms are a bit different (eg, large value instead of zero
for MAXALIGN) but that's not too surprising considering that 8.1
and 8.2 have different sets of fields in pg_control.

You'll need to get binaries that matched your originals and then
reinstall the database from your backup.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Server format and recovery
  2008-04-25 01:17 Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  2008-04-25 14:03 ` Re: Server format and recovery Shane Ambler <pgsql@Sheeky.Biz>
  2008-04-25 14:51   ` Re: Server format and recovery Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-04-25 15:39     ` Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  2008-04-26 18:45       ` Re: Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Márcio Aguiar Ribeiro @ 2008-04-25 15:39 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Shane Ambler <pgsql@sheeky.biz>; pgsql-admin

Thanks for the fast response!

The hardware was the same of the previous, but I'm not sure about
Ubuntu version.
As I got the whole old server backup, I know that the Postgres version
is 8.2 by looking at the PGVERSION file. Not sure if it is 8.2.5, but
I imagined that it wouldn't make much difference.

I installed the postgres via apt-get, and the installation structure
was the same of the previous one. I even tried to copy the whole
Postgres  installation from the backup, but when I try to start the
server with the postgres command, I receive an error from the OS
saying it was impossible to execute the binaries. Now I'm thinking
that a 64bit version was installed.

I'll try to investigate this a little further and keep up with you.

Thanks for the help!

On Fri, Apr 25, 2008 at 11:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Shane Ambler <pgsql@Sheeky.Biz> writes:
>
> > Márcio Aguiar Ribeiro wrote:
>  >> "FATAL:  database files are incompatible with server
>  >> The database cluster was initialized with MAXALIGN 0, but the server
>  >> waas compiled with MAXALIGN 4." (translated from my language to
>  >> english by me)
>
>
> > My first guess is that the new postgresql binaries are 64 bit but the
>  > old install was 32 bit. (I don't actually know the conditions for the
>  > MAXALIGN value)
>
>  That's what I'm guessing too; see the previous report here:
>
>  http://archives.postgresql.org/pgsql-admin/2007-12/msg00254.php
>  http://archives.postgresql.org/pgsql-admin/2008-01/msg00023.php
>
>  The symptoms are a bit different (eg, large value instead of zero
>  for MAXALIGN) but that's not too surprising considering that 8.1
>  and 8.2 have different sets of fields in pg_control.
>
>  You'll need to get binaries that matched your originals and then
>  reinstall the database from your backup.
>
>                         regards, tom lane
>



-- 
Marcio Aguiar Ribeiro



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Server format and recovery
  2008-04-25 01:17 Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  2008-04-25 14:03 ` Re: Server format and recovery Shane Ambler <pgsql@Sheeky.Biz>
  2008-04-25 14:51   ` Re: Server format and recovery Tom Lane <tgl@sss.pgh.pa.us>
  2008-04-25 15:39     ` Re: Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
@ 2008-04-26 18:45       ` Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Márcio Aguiar Ribeiro @ 2008-04-26 18:45 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Shane Ambler <pgsql@sheeky.biz>; pgsql-admin

The problem was that! I reinstalled the OS using the 64bit version and
copied the postgres data dir and it worked!

Thank you!

On Fri, Apr 25, 2008 at 12:39 PM, Márcio Aguiar Ribeiro
<aguiar.marcio@gmail.com> wrote:
> Thanks for the fast response!
>
>  The hardware was the same of the previous, but I'm not sure about
>  Ubuntu version.
>  As I got the whole old server backup, I know that the Postgres version
>  is 8.2 by looking at the PGVERSION file. Not sure if it is 8.2.5, but
>  I imagined that it wouldn't make much difference.
>
>  I installed the postgres via apt-get, and the installation structure
>  was the same of the previous one. I even tried to copy the whole
>  Postgres  installation from the backup, but when I try to start the
>  server with the postgres command, I receive an error from the OS
>  saying it was impossible to execute the binaries. Now I'm thinking
>  that a 64bit version was installed.
>
>  I'll try to investigate this a little further and keep up with you.
>
>  Thanks for the help!
>
>
>
>  On Fri, Apr 25, 2008 at 11:51 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>  > Shane Ambler <pgsql@Sheeky.Biz> writes:
>  >
>  > > Márcio Aguiar Ribeiro wrote:
>  >  >> "FATAL:  database files are incompatible with server
>  >  >> The database cluster was initialized with MAXALIGN 0, but the server
>  >  >> waas compiled with MAXALIGN 4." (translated from my language to
>  >  >> english by me)
>  >
>  >
>  > > My first guess is that the new postgresql binaries are 64 bit but the
>  >  > old install was 32 bit. (I don't actually know the conditions for the
>  >  > MAXALIGN value)
>  >
>  >  That's what I'm guessing too; see the previous report here:
>  >
>  >  http://archives.postgresql.org/pgsql-admin/2007-12/msg00254.php
>  >  http://archives.postgresql.org/pgsql-admin/2008-01/msg00023.php
>  >
>  >  The symptoms are a bit different (eg, large value instead of zero
>  >  for MAXALIGN) but that's not too surprising considering that 8.1
>  >  and 8.2 have different sets of fields in pg_control.
>  >
>  >  You'll need to get binaries that matched your originals and then
>  >  reinstall the database from your backup.
>  >
>  >                         regards, tom lane
>  >
>
>
>
>  --
>  Marcio Aguiar Ribeiro
>



-- 
Marcio Aguiar Ribeiro
Rio de Janeiro/RJ, Brasil



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2008-04-26 18:45 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-04-25 01:17 Server format and recovery Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
2008-04-25 14:03 ` Shane Ambler <pgsql@Sheeky.Biz>
2008-04-25 14:51   ` Tom Lane <tgl@sss.pgh.pa.us>
2008-04-25 15:39     ` Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>
2008-04-26 18:45       ` Márcio Aguiar Ribeiro <aguiar.marcio@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox