Re: Help - corruption issue?

From: Shashank Tripathi <shanx(at)shanx(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help - corruption issue?
Date: 2011-04-25 19:30:34
Message-ID: BANLkTikb=BGZV=1L2p0H0eSwSZWLF84aoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, April 26, 2011, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> Dne 25.4.2011 18:16, Phoenix Kiula napsal(a):
>> Sorry, spoke too soon.
>>
>> I can COPY individual chunks to files. Did that by year, and at least
>> the dumping worked.
>>
>> Now I need to pull the data in at the destination server.
>>
>> If I COPY each individual file back into the table, it works. Slowly,
>> but seems to work. I tried to combine all the files into one go, then
>> truncate the table, and pull it all in in one go (130 million rows or
>> so) but this time it gave the same error. However, it pointed out a
>> specific row where the problem was:
>>
>> COPY links, line 15272357:
>> "16426447     9s2q7   9s2q7   N       http://www.amazon.com/gp/search?camp=1789&amp;creative=9325&amp;ie=UTF8&amp;i..."
>> server closed the connection unexpectedly
>>       This probably means the server terminated abnormally
>>       before or while processing the request.
>> The connection to the server was lost. Attempting reset: Failed.
>>
>> Is this any use at all?  Would appreciate any pointers!
>
> So the dump worked fina and it fails when loading it back into the DB?
> Have you checked the output file (just see the tail). Can you post the
> part that causes issues? Just the line 16426447 and few lines around.
>
> regards
> Tomas
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Ok let me explain.

Pg_dumpall did not work. It kept on crashing.

So I did copy, with conditional commands, copying one year at a time.
This process took me a day and a half but I now have files with copy
dumps for last 11 years.

On the fresh server, instead of 'copy from' with 11 files I
cocatenated the files into one.

Then in a transaction, I imported this file into the new database, which has:

Begin
Truncate table
Copy from into table
Commit

This worked. I confirmed by checking for new disk usage in the ~/data
folder. it has gone up by 64gig.

Yet that SQL gives me no rows.

--
Shashank Tripathi
+1 646 755 9860
+65 932 55 600

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2011-04-25 20:23:05 Re: 10 missing features
Previous Message Tomas Vondra 2011-04-25 19:14:32 Re: Help - corruption issue?