Thread: pg_clog/0202 Error

pg_clog/0202 Error

From
Judith Altamirano
Date:
Hello every body I just want to know why is happening this to my data 
base I'm doing the following query:
    SELECT * FROM pagos where date(fecha_pago) = '2008-12-15';


It returns the next error:
   ERROR: can't find the transaction status 538976288   DETAIL: can't open file <<pg_clog/0202>> not exist file or
directory


what supposes that I must do?, is the table damaged?


Re: pg_clog/0202 Error

From
Tom Lane
Date:
Judith Altamirano <jaltamirano@correolux.com.mx> writes:
> Hello every body I just want to know why is happening this to my data 
> base I'm doing the following query:

>      SELECT * FROM pagos where date(fecha_pago) = '2008-12-15';

> It returns the next error:

>     ERROR: can't find the transaction status 538976288
>     DETAIL: can't open file <<pg_clog/0202>> not exist file or directory

That looks a whole lot like a corrupt-data problem --- not least because
538976288 = 0x20202020, ie four ASCII spaces.  It would seem that
something overwrote one of your data rows with text.  (The reason you
get this message rather than something more useful is that the
transaction ID number is the first part of the row data that Postgres
can check with any degree of strictness.)

If I had to bet I'd bet first on a kernel bug that caused a page of some
text file to get dumped into your Postgres data file.  It's also
possible that you had a hardware-level glitch that led the disk drive to
write data in the wrong place.  Make sure your system software is up to
date, and then run some disk diagnostics.

If you don't have a database backup you can revert to, look through the
PG list archives for advice about recovering from corrupt data.  That
particular row is gone beyond recall, but you should be able to clear
out the damaged page(s) and at least recover the rest of your table.
        regards, tom lane