1

This error has just started popping when I run queries against TABLE_A .......

ERROR: XX001: invalid page in block 38 of relation pg_tblspc/16402/PG_14_202107181/16404/125828

If I try a very simple query against the same table for example SELECT * FROM TABLE_A I get a similar error....

ERROR:  invalid memory alloc request size 18446744073709551613 
SQL state: XX000

Or another similar query select count(*) from TABLE_A gives me....

ERROR:  could not access status of transaction 917520
DETAIL:  Could not open file "pg_xact/0000": No such file or directory.
SQL state: 58P01

Based on this thread I tried this fix....

SET zero_damaged_pages = on;
VACUUM full TABLE_A;
REINDEX TABLE TABLE_A;

The 2nd command, VACUUM full TABLE_A produced another related error....

ERROR:  found xmax 16384 from before relfrozenxid 379279265 
SQL state: XX001

I think all these problems boil down to a simple case of file corruption at the OS level. I do have the ability to drop and re-create this table, but before I start I'd like to know if there's a quicker/simpler solution, and if there's any way of stopping this from happening again.

ConanTheGerbil
  • 677
  • 8
  • 21

0 Answers0