Re: how do I clear a page, or set an item in a page to

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 20:38:36
Message-ID: 423F30CC.60000@globalrelay.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Eric Parusel <lists(at)globalrelay(dot)net> writes:
>
>>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)
>
> dd bs=8k seek=28393 count=1

shutdown postgres
cp base/dbnum/tablenum* /somewhere/else
dd if=/dev/zero of=base/dbnum/tablenum bs=8k seek=28393 count=1
startup postgres

It worked...! select count(*) from table; now works fine!
I'm currently doing a vacuum then a db dump to confirm there's no other
page issues...

Vacuum is aptly reporting:
WARNING: relation "table" page 28393 is uninitialized --- fixing

Thanks for your assistance, hopefully this helps someone else in the
future a little bit.

I don't know why the problem occurred, but I don't think it's realistic
to figure that out easily. (disk, raid, server, os, pgsql, or some
combination!)

Eric

In response to

Browse pgsql-general by date

  From Date Subject
Next Message TJ O'Donnell 2005-03-21 20:39:09 bit varying(512) vs bytea(64)
Previous Message Alvaro Herrera 2005-03-21 20:38:32 Re: Encoding-related errors when moving from 7.3 to 8.0.1