Wouldn't zero_damaged_pages help here? http://www.postgresql.org/docs/7.4/static/runtime-config.html#RUNTIME-CONFIG-DEVELOPER
On Mon, 2005-03-21 at 13:28, Eric Parusel wrote: > Tom Lane wrote: > > Eric Parusel <[EMAIL PROTECTED]> writes: > > > >>I've got a mucked up page in my db, and I can't complete a database dump > >>until a particular page is fixed/removed from the table. :( > > > > Zeroing the page is the most painless way. dd from /dev/zero will get > > it done --- but note that you have to shut down the postmaster meanwhile > > to ensure Postgres will see your change. > > ok, I can dd, if=/dev/zero of=base/dbnum/tablenum, but how do I figure > how where and how much to write over? > Is there an easy to see or calculate offset value for a particular page > number? (28393) > > from pg_filedump: > Block 28393 ******************************************************** > <Header> ----- > Block Offset: 0x0ddd2000 Offsets: Lower 56 (0x0038) > Block: Size 8192 Version 2 Upper 1064 (0x0428) > LSN: logid 242 recoff 0x9387bd78 Special 8192 (0x2000) > Items: 9 Free Space: 1008 > Length (including item array): 60 > > So I could take the block offset, convert it from hex (to 232595456... > oh, /8192 = 28393 :) ), and the block size (which is default: 8192) to do: > > dd if=/dev/zero of=base/17760/18804 obs=8192 seek=28393 > ? > > Should I, or do I need to REINDEX after this? > > If you could confirm that I answered my own question, that would be > great :) > > Thanks, > Eric > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]