| From: | Eric Parusel <lists(at)globalrelay(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: how do I clear a page, or set an item in a page to |
| Date: | 2005-03-21 19:28:03 |
| Message-ID: | 423F2043.9090502@globalrelay.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Tom Lane wrote:
> Eric Parusel <lists(at)globalrelay(dot)net> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2005-03-21 19:45:23 | Re: how do I clear a page, or set an item in a page to |
| Previous Message | Jay Guerette | 2005-03-21 19:27:39 | Re: Copression |