missing chunk number error? - Mailing list pgsql-general

From Johnson, Shaunn
Subject missing chunk number error?
Date
Msg-id 73309C2FDD95D11192E60008C7B1D5BB05FED495@snt452.corp.bcbsm.com
Whole thread Raw
List pgsql-general

Howdy:

Running PostgreSQL 7.2.1 on RedHat Linux 7.2.

Last week I had asked about splitting a table
and the errors I was getting, e.g.,:

[snip error]
FATAL 2:  open of /var/lib/pgsql/data/pg_clog/0003 failed:
No such file or directory
[/snip error]

[snip from groups.google.com]

If you just want to get rid of the bad data as expeditiously as
possible, I'd suggest (a) make a file 256K long containing all zeroes,
(b) temporarily install it as $PGDATA/pg_clog/02B6, (c) run VACUUM;
(d) remove the bogus 02B6 file again.  However this will probably ruin
any chance of deducing what went wrong afterwards...

[/snip from groups.google.com]

I tried this and got a few errors when I tried to vacuum and
work with the database (via: point #2
dd if=/dev/zero of=~/pgsql/data/base/pg_clog/0003 bs=1024k count=256 ):

[snip errors from log]

Jun 20 16:46:47 hmp postgres[16527]: [25811] DEBUG:  ReadRecord: record with zer
o length at 328/E1E75858
Jun 20 16:46:47 hmp postgres[16527]: [25812] DEBUG:  redo is not required
Jun 20 16:46:49 hmp postgres[16527]: [25813] DEBUG:  database system is ready

[/snip errors from log]

So when I tried to do a vacuum and start the database I got
errors like this:

[snip errors from log]

Jun 20 16:46:49 hmp postgres[16527]: [25814] DEBUG:  proc_exit(0)
Jun 20 16:46:49 hmp postgres[16527]: [25815] DEBUG:  shmem_exit(0)
Jun 20 16:46:49 hmp postgres[16527]: [25816] DEBUG:  exit(0)
Jun 20 16:46:49 hmp postgres[1085]: [25806] DEBUG:  reaping dead processes
Jun 20 16:46:52 hmp postgres[1085]: [25807] DEBUG:  pmdie 2
Jun 20 16:46:52 hmp postgres[1085]: [25808] DEBUG:  fast shutdown request
Jun 20 16:46:52 hmp postgres[16579]: [25809] DEBUG:  shutting down
Jun 20 16:46:54 hmp postgres[16579]: [25810] DEBUG:  database system is
shut down
Jun 20 16:46:54 hmp postgres[16579]: [25811] DEBUG:  proc_exit(0)

[/snip errors from log]

I was able to open the connection, but when I tried to
run a query, the database went into recovery mode at once.

Later, I found that the files under ~pg_clog were being deleted.
I only had one left and the error logs was telling me that
there was no file such as ~/pg_clog/004, 005, 006, etc ...
and the zero-length dummy files didn't work. So ... I tried
to copy the last file, '007' to the others that were missing
and *poof*  things started to work again.

I figured while I had a moment, I would try to do a vacuum of the
database, but when I did, the vacuum portion died as it has
before; which at this time was not a big deal because *something*
was working - even though this just brought me back to a full
circle of needing to upgrade.

With THAT said, this morning, I come into work and saw an
error that stood out with a particular view.

[snip from email to me]

pg_dump: query to obtain definition of view "t_ref_hedis_ce" failed:
ERROR:  missing chunk number 0 for toast value 2085599783

[/snip from email to me]

(what the frel?)

[snip from command line]

test_db=> drop view t_ref_hedis_ce ;
ERROR:  missing chunk number 0 for toast value 2085599783
test_db=>

[/snip from command line]

Okay ... can someone tell me what this means (other than I
am going to burn the midnight oil in the next few days) when
I try to query or drop the view and I get messages like this?

(what a long posting this is ...)

Thanks!

-X

pgsql-general by date:

Previous
From: Lincoln Yeoh
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread
Next
From: "Reuben D. Budiardja"
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread