SymptomsSometimes the transaction log files become corrupted or deleted due to hordware crash, orpower failure, usually the error is like folowing:
hsphere=# select * from TABLE;
ERROR: could not access status of transaction 1918986094
DETAIL: could not open file "/var/lib/pgsql/data/pg_clog/0726": No such file or directory
ResolutionThe needed file should be reacreated manually with blanked inside, but filesize should be the same, so the /var/lib/pgsql/data/pg_clog/0726 should be created this way:
# su - postgres
# dd if=/dev/zero of=/var/lib/pgsql/data/pg_clog/0726 bs=256k count=1
Usually several files become broken and you need to recreate all of them.