[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1140
  • 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
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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.


Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

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