PDA

View Full Version : Postgres error during backup/maintence



nailuj90
06-08-2011, 10:00 AM
Hey,recently i can't do any backups/maintence. i get the error:


pg_dump: gebe Inhalt der Tabelle playerhandstourneykeycolumns_hero aus
pg_dump: gebe Inhalt der Tabelle playerhandstourneymisc aus
pg_dump: SQL-Anweisung schlug fehl
pg_dump: Fehlermeldung vom Server: ERROR: invalid page header in block 49397 of relation base/16761/16903
pg_dump: Die Anweisung war: COPY public.playerhandstourneymisc (playerhand_id, stacksize, effectivestacksize, seatnumber, offthebutton, finalhandtype_id, ishero, sawflopastype_id, betamountpreflop, callamountpreflop, postamountpreflop, totalbetspreflop, totalcallspreflop, threebetresponsetype_id, fourbetresponsetype_id, limpreraisedpreflop, bbstealattempted, bbstealdefended, bbstealreraised, sbstealattempted, sbstealdefended, sbstealreraised, preflopraisepercentofpot, facingraisepercentofpot) TO stdout;
pg_dump: *** abgebrochen wegen Fehler

Prozess beendete mit Exitcode 1.


What can i do to fix this?... reindexing/vacuum doesnt help

Patvs
06-08-2011, 07:56 PM
It looks like a corruption in one of the indexes. (error: invalid page header in block 49397 of relation base/16761/16903)

Restore a previous .backup. (which should be an uncorrupted database) And try to backup that database.
If you get a similar error, create a NEW empty database and reimport your hands.

nailuj90
06-08-2011, 07:58 PM
not really willing to do this...huge db ... many notes etc.

No way to fix this??

Patvs
06-08-2011, 08:13 PM
Backup/export your notes!

The only way to fix a corrupt index is a reindex. (in pgadminIII)
But that will only rarely fix a corrupt index.


---

If you're going to reimport ALL your hands into a new database, it may also be a good time to also update your PostgreSQL.
8.4.1--> to 8.4.8
Or use 9.0.4