Skip site navigation (1) Skip section navigation (2)

pg_clog corrupt, can't start postgres

From: "Anjan Dave" <adave(at)vantage(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: pg_clog corrupt, can't start postgres
Date: 2005-02-21 15:58:16
Message-ID: 4BAFBB6B9CC46F41B2AD7D9F4BBAF78509881E@vt-pe2550-001.vantage.vantage.com (view raw or flat)
Thread:
Lists: pgsql-admin
Hi,
 
I need some help in bringing back this db please.
 
The partition ran out of space from an import process. I cleared up the space and attempted to start the postgres service again, but it doesn't start and i get following in the message log.
 
HINT:  This probably means that some data is corrupted and you will have to use the last backup for recovery.
LOG:  checkpoint record is at 1B/27F23A6C
LOG:  redo record is at 1B/27751714; undo record is at 0/0; shutdown FALSE
LOG:  next transaction ID: 45279762; next OID: 43062083
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  redo starts at 1B/27751714
PANIC:  could not access status of transaction 45514755
DETAIL:  could not read from file "/var/lib/pgsql/data/pg_clog/002B" at offset 106496: Success
LOG:  startup process (PID 23991) was terminated by signal 6
LOG:  aborting startup due to startup process failure

Postgres is 7.4.1 on this machine.
 
I saw some previous posts on this subject and so far the solution seems to be initialize and restore databases from the dumps.
 
I can live with some aborted transactions, if it's possible to recover somehow.
 
$ psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
 
# ls -l pg_xlog/
total 131232
-rw-------    1 postgres postgres 16777216 Feb 19 13:30 0000001B00000026
-rw-------    1 postgres postgres 16777216 Feb 19 13:34 0000001B00000027
-rw-------    1 postgres postgres 16777216 Feb 19 13:44 0000001B00000028
-rw-------    1 postgres postgres 16777216 Feb 19 13:15 0000001B00000029
-rw-------    1 postgres postgres 16777216 Feb 19 13:12 0000001B0000002A
-rw-------    1 postgres postgres 16777216 Feb 19 13:18 0000001B0000002B
-rw-------    1 postgres postgres 16777216 Feb 19 13:26 0000001B0000002C
-rw-------    1 postgres postgres 16777216 Feb 19 13:22 0000001B0000002D
# ls -l pg_clog/
total 628
-rw-------    1 postgres postgres   262144 Feb 19 04:31 0029
-rw-------    1 postgres postgres   262144 Feb 19 11:55 002A
-rw-------    1 postgres postgres   106496 Feb 20 22:34 002B

Thanks,
Anjan

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2005-02-21 16:15:05
Subject: Re: Having problem with postgresql configuration (template1 doesn't
Previous:From: Gourish SingbalDate: 2005-02-21 15:49:06
Subject: Re: ERROR: 40P01:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group