Thread: PANIC: read of clog file 0, offset 16384 failed: Success

PANIC: read of clog file 0, offset 16384 failed: Success

From
"Luna Kid"
Date:
Hi,

After a heavy server upgrade (involving lots of risky manual
copying etc...) it seems I managed to screw my Postgres setup.

It does appear to start up successfully (on my Debian box):

    # /etc/init.d/postgresql start
    Starting PostgreSQL postmaster.
    postmaster successfully started

but it's only kidding, and the postgres.log is not so optimistic
about the situation...:

2003-04-13 11:37:17 [8585]   LOG:  database system was interrupted being in recovery at 2003-04-12 19:51:26 CEST
        This probably means that some data blocks are corrupted
        and you will have to use the last backup for recovery.
2003-04-13 11:37:17 [8585]   LOG:  checkpoint record is at 0/8642CCC
2003-04-13 11:37:17 [8585]   LOG:  redo record is at 0/8642CCC; undo record is at 0/0; shutdown TRUE
2003-04-13 11:37:17 [8585]   LOG:  next transaction id: 65642; next oid: 25168
2003-04-13 11:37:17 [8585]   LOG:  database system was not properly shut down; automatic recovery in progress
2003-04-13 11:37:17 [8585]   LOG:  redo starts at 0/8642D0C
2003-04-13 11:37:17 [8585]   PANIC:  read of clog file 0, offset 16384 failed: Success
2003-04-13 11:37:17 [8581]   LOG:  startup process (pid 8585) was terminated by signal 6
2003-04-13 11:37:17 [8581]   LOG:  aborting startup due to startup process failure

Could someone please enlighten me about what I can do
about this schizoid "failed: Success" problem?! Can
I simply delete that clog file ("0000", 16384 long)?
(Yeah, I know I can't just do that with the xlogs...)
Or how can I reset it? I don't feel like doing a full
restore yet again... :-/

(Anyway, it's a low traffic installation, and I'm a
PSQL-newbie yet.)

Thanks!

Lunatic

Re: PANIC: read of clog file 0, offset 16384 failed: Success

From
Tom Lane
Date:
"Luna Kid" <listreader@neuropolis.org> writes:
> After a heavy server upgrade (involving lots of risky manual
> copying etc...) it seems I managed to screw my Postgres setup.

Did you not copy the contents of $PGDATA/pg_clog?  Let's see an ls -l
of that directory ...

            regards, tom lane