BUG #5077: Corrupted Table - Mailing list pgsql-bugs

From Bryan McLemore
Subject BUG #5077: Corrupted Table
Date
Msg-id 200909232329.n8NNTXER019344@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5077: Corrupted Table  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5077
Logged by:          Bryan McLemore
Email address:      kaelten@gmail.com
PostgreSQL version: 8.4.0
Operating system:   Ubuntu 64 bit
Description:        Corrupted Table
Details:

Today a table corrupted and I started getting:

"invalid page header in block 900 of relation pg_tblspc/32041/138911/187737"


on all selects on a given table.

RhodiumToad & StuckMojo (and a few others) helped me track it down.  The
page in question looked like this:

http://pgsql.privatepaste.com/83JfmQGtS5

RhodiumToad gave me this command to repair the table:

printf '\x00\x01\x40\x03\x00\x20' | dd of=pg_tblspc/32041/138911/187737 bs=1
conv=notrunc seek=7372812 count=6

The reason they asked me to report this is that it appears this occured when
a disk filled up while pg_dump was running.


On this system df -h shows:

/dev/sda1              65G   23G   39G  38% /
varrun                4.0G   48K  4.0G   1% /var/run
varlock               4.0G     0  4.0G   0% /var/lock
udev                  4.0G   40K  4.0G   1% /dev
devshm                4.0G     0  4.0G   0% /dev/shm
/dev/sdb1             136G   23G  107G  18% /data


/dev/sda1 is where the pgdata directory is.
/dev/sbd1 is where the tablespace is.

/sda1 is the drive that filled up while running a pg_dump.

If there is any additional info I can provide please let me know.

pgsql-bugs by date:

Previous
From: Euler Taveira de Oliveira
Date:
Subject: Re: BUG #5075: Text Search parser does not identify xml tag when attribute name's contains underscore
Next
From: "Mauro Infantino"
Date:
Subject: BUG #5076: LEFT OUTER JOIN and WHERE madness