On Thu, Mar 09, 2006 at 11:13:40AM +1100, Noel Faux wrote: > Ok it worked but we ran into another bad block :( > /vacuumdb: vacuuming of database "monashprotein" failed: ERROR: invalid > page header in block 9022937 of relation "gap" > / > So the command we used was: > dd bs=8k seek=110025 conv=notrunc count=1 if=/dev/zero > of=/usr/local/postgresql/postgresql-7.4.8/data/base/37958/111685332.68 > > I'm tried to work out the formula for finding the file (i.e. the > 111685332.*) to fix and the value to seek to, but as a complete novice > I'm lost, any pointers would be a great help. We checked the block size > and it's 8192. The database files are 1G, or 131072 8k blocks. The bad block you zeroed was 9022921; here's how you could have determined the file and block number within that file: test=> SELECT 9022921 / 131072 AS filenum, 9022921 % 131072 AS blocknum; filenum | blocknum ---------+---------- 68 | 110025 (1 row) The new bad block is 9022937 so the query would be: test=> SELECT 9022937 / 131072 AS filenum, 9022937 % 131072 AS blocknum; filenum | blocknum ---------+---------- 68 | 110041 (1 row) If you're running 7.4.8 then consider upgrading to 7.4.12. Offhand I don't know if any bugs have been fixed that might cause the problem you're seeing, but there have been other bug fixes. -- Michael Fuhr