Out of memory or corrupted data?

Questions and answers regarding general SQL and backend databases

Out of memory or corrupted data?

Postby m.vanklink » Wed Oct 03, 2012 1:26 pm

When doing a pg_dump I run into the following error:

Code: Select all
...
ERROR:  out of memory
DETAIL:  Failed on request of size 536870912.
STATEMENT:  COPY public.crm_department_output (crm_department_output_id, document_type, document_format_type, crm_department_id, document_date, origin_type, origin_id, owner_id, log_creation_user, log_creation_dt, log_modification_user, log_modification_dt, document, checkout_dt, checkout_user, checkin_dt, name, document_sequence_integer, amount_excl_vat, amount_incl_vat, glb_currency_id, currency_amount_excl_vat, currency_amount_incl_vat, document_reference, crm_contactperson_id, mailed_dt, faxed_dt, cost_price, printed_dt, start_date, end_date) TO stdout;


How can I increase the memory that can be used by postgres?

A google search showed me that this error could be caused by corrupted data.
This table has one field of type bytea (document). The following query does not give an error:

Code: Select all
select length(document) from crm_department_output


Largest values are around 90 million. How could the corrupted record(s) be found if present?

I'm using postgresql 8.4 shipped with servoy 5.2

Kind Regards,
Michel van Klink
Vision Development
m.vanklink
 
Posts: 70
Joined: Thu Feb 23, 2012 9:15 am
Location: The Netherlands

Re: Out of memory or corrupted data?

Postby m.vanklink » Wed Oct 03, 2012 4:57 pm

Found it, turned out to be corrupted data! Hard work, like finding a needle in a haystack...

When data is corrupted is there no way to (partially) restore it?
Michel van Klink
Vision Development
m.vanklink
 
Posts: 70
Joined: Thu Feb 23, 2012 9:15 am
Location: The Netherlands


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 6 guests