Search Postgresql Archives

Re: Data corruption zero a file - help!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for all your help Michael, we wish to do a vacuum and dump before the upgrade to 8.02.  Do you believe this data corruption is a postgres issue of an OS / hardware issue?

Cheers
Noel

Michael Fuhr wrote:
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.

  

begin:vcard
fn:Noel Faux
n:Faux;Noel
org:Monash University;Biochemistry and Molecular Biology
adr:;;;Clayton;Vic;3800;Australia
email;internet:noel.faux@xxxxxxxxxxxxxxxxx
tel;work:+61 03 9905 1418
url:http://vbc.med.monash.edu.au/~fauxn
version:2.1
end:vcard


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux