• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1169
  • Last Modified:

When i dump my postgres database , igot the error "pg_dump: ERROR: missing chunk number 0 for toast value 33956310" how to fix this ?

when i dump  postgres database  "itlive " . i got the error " pg_dump: ERROR:  missing chunk number 0 for toast value 33956310" "pg_dump: SQL command to dump the contents of table "ctattach" failed: PQendcopy() failed.
g_dump: The command was: COPY public.ctattach (ctattachid, ctfiledetail, ctfilename, ctattachment, ctattachedby, ctattacheddate, ctusertype, ctisescalatedreport, ctattachedby_companyid, ctattachedby_type) TO stdout;" . i can see the output size as 1Gb . what is abt this error & how to fix .?
  • 3
  • 3
2 Solutions
Can you provide:
1) exact size of output in bytes
2) version of postgresql
3) version of operating system
kumarnirmalAuthor Commented:
2)postgressql 7.4
3)suse 9
kumarnirmalAuthor Commented:
1) exact size of output in bytes =1091737
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Exact information means:
1) ls -l the.file
2) select version();
3) uname -a

Error you mention is due to bug in old database. You reindexed one table and all tables that references to it will show this error.
You can reindex ctattach, select * from ctattach or do vacuum full (analyse) (verbose);
kumarnirmalAuthor Commented:
Hi i have already tried this reindexing and vacuumfull , no sweet.Here with giving detail

1) -rw-r--r--  1 root root 1116844167 Aug 19 07:43 ithelpdesk_live.sql
2)PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 (SuSE 3)Linux)PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 (SuSE Linux)
1) Size is not even, so there is no OS limitation hitting
2) thats old as hell.

I have found 3 error handling in updates in pg_dump* around here:

Can you transfer data directory to windows and do pg_dumpall v7.4.23 from there?
I would expect that a missing chunk error message indicates either corruption of the table ctattach or corruption of the associated "toast" table or its index. Basically the error means that it couldn't find a value.

There are a couple of ways you can proceed - I'm not sure that a newer version will necessarily help though.

If you do "select reltoastrelid from pg_class where relname='clattach';

...and note the number you get.

Then do "select relname from pg_class where oid =12345;

(where 12345 was the number you got previously)

and try "reindex table pg_toast_23456" where pg_toast_23456 was the name you received above.

This may not help you, but is worth trying.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now