Re: Is my db dead ?

From: "Eric Renard" <dawmette(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is my db dead ?
Date: 2008-02-05 17:08:41
Message-ID: 9a6374240802050908o37524e36kc0231a15bacea8cc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok I progressed a bit, now with psql I can see my main db and some tables,
but they don't contain many rows.
Noticable messages in the logfile :
2008-02-05 18:01:18 CET LOG: transaction ID wrap limit is 1073748480,
limited by database "wowdbu"
2008-02-05 18:01:18 CET LOG: autovacuum: processing database "postgres"
2008-02-05 18:01:18 CET LOG: incomplete startup packet
2008-02-05 18:02:08 CET LOG: incomplete startup packet

I tried a pg_dumpall and it fails quickly with this error :
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: could not access status of
transaction 3270404
DETAIL: could not open file "pg_clog/0003": No such file or directory
pg_dump: The command was: SELECT tableoid, oid, proname, prolang, pronargs,
proargtypes, prorettype, proacl, pronamespace, (SELECT rolname FROM
pg_catalog.pg_roles WHERE oid = proowner) as rolname FROM pg_proc WHERE NOT
proisagg AND pronamespace != (select oid from pg_namespace where nspname =
'pg_catalog')
pg_dumpall: pg_dump failed on database "postgres", exiting

I read about things like zeroing missing pg_clog files... Can it work ? I
thought clog files were about transactions, but I don't care about last
transactions, even data from 1 month ago would be enough for me.
So what can I do from there ?

On Feb 5, 2008 4:19 PM, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:

> dawmette(at)gmail(dot)com escribió:
> > My server crashed yesterday, the hd was saved though and I was able to
> > get a copy of the data directory of my pg cluster. On the server now,
> > when I start pg, I can see only like 1% of my data, there are many dbs/
> > tables and rows missing. But the data dir seems ok in size though. So
> > I copied the whole data dir to a new serv, installed the same pg
> > version but now I can't get it started at all. There are some weird
> > things in the pg_controldata :
> >
> > pg_control last modified: Tue 03 Sep 6869 17:57:36 CET
> > Time of latest checkpoint: Thu 11 Jan 1116953 03:46:31 CET
> > LC_COLLATE:
> > LC_CTYPE:
>
> What's the full pg_controldata output? Can you send the pg_control file
> as a binary attachment?
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-02-05 17:11:06 Re: Renaming a constraint
Previous Message Alex Turner 2008-02-05 16:17:56 Re: [OT] "advanced" database design (long)