pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Another database recovery problem
2+ messages / 2 participants
[nested] [flat]

* Another database recovery problem
@ 2003-10-30 23:59  Chris White (cjwhite) <cjwhite@cisco.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Chris White (cjwhite) @ 2003-10-30 23:59 UTC (permalink / raw)
  To: pgsql-admin

My 7.2.1 database was in the middle of inserting a large object when the
power went down. When I restart the database I getting the following
messages:

postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  database
system was interrupted at 2003-10-08 09:29:12 PDT
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  checkpoint
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  redo record
is at 0/115A3C; undo record is at 0/0; shutdown TRUE
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  next
transaction id: 95; next oid: 16557
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  database
system was not properly shut down; automatic recovery in progress
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  redo starts
at 0/115A7C
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  ReadRecord:
record with zero length at 0/157F4C
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  redo done
at 0/157F28
postgres: startup subprocess   :   DEBUG sql sql sql DEBUG:  database
system is ready
 
 
When I vacuum the database to remove used entries and to compact the db,
I get the following errors:

postgres: voicemail aesop 127.0.0.1 VACUUM:   DEBUG sql sql sql DEBUG
--Relation pg_largeobject--
postgres: voicemail aesop 127.0.0.1 VACUUM:    INFO sql sql sql NOTICE:
Rel pg_largeobject: TID 1/1: InsertTransactionInProgress 0 - can't
shrink relation
postgres: voicemail aesop 127.0.0.1 VACUUM:    INFO sql sql sql NOTICE:
Rel pg_largeobject: TID 1/2: InsertTransactionInProgress 0 - can't
shrink relation
postgres: voicemail aesop 127.0.0.1 VACUUM:    INFO sql sql sql NOTICE:
Rel pg_largeobject: TID 1/4: InsertTransactionInProgress 0 - can't
shrink relation
postgres: voicemail aesop 127.0.0.1 VACUUM:   CRASH sql sql sql FATAL2:
open of /data/sql/pg_clog/09C6 failed: No such file or directory
postmaster:   DEBUG sql sql sql DEBUG:  server process (pid 1393) exited
with exit code 2
postmaster:   DEBUG sql sql sql DEBUG:  terminating any other active
server processes
postmaster:   ERROR sql sql sql FATAL 1:  The database system is in
recovery mode
 
and from then on any time we try to connect we get a message saying
database is in recovery mode and it never comes out. How can I recover
this database or do I have to restore a prior backup?
 
Chris White

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

* Re: Another database recovery problem
@ 2003-10-31 00:38  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Chris White (cjwhite) <cjwhite@cisco.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2003-10-31 00:38 UTC (permalink / raw)
  To: cjwhite@cisco.com; +Cc: pgsql-admin

"Chris White (cjwhite)" <cjwhite@cisco.com> writes:
> My 7.2.1 database was in the middle of inserting a large object when the
> power went down.

You really, really, really should be on 7.2.4 (if not 7.3.*).  We don't
make dot-releases for amusement's sake --- there are some critical bug
fixes between 7.2.1 and 7.2.4, including some possibly relevant to your
problem.

> postgres: voicemail aesop 127.0.0.1 VACUUM:   CRASH sql sql sql FATAL2:
> open of /data/sql/pg_clog/09C6 failed: No such file or directory

This looks like a corrupted page in (probably) pg_largeobject --- do you
get the same if you try, say, "select count(*) from pg_largeobject"?

> and from then on any time we try to connect we get a message saying
> database is in recovery mode and it never comes out. How can I recover
> this database or do I have to restore a prior backup?

I can't think of any reasonable fix in 7.2.* other than truncating
pg_largeobject, after which you'd need to reload the large objects
somehow.  If you are lucky, the corruption doesn't affect any of the
valid data --- have you tried pg_dumping the database?  A dump and
reload of the particular database would be the most reliable solution.

			regards, tom lane



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


end of thread, other threads:[~2003-10-31 00:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 23:59 Another database recovery problem Chris White (cjwhite) <cjwhite@cisco.com>
2003-10-31 00:38 ` Tom Lane <tgl@sss.pgh.pa.us>

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