Re: [Re] Re: [Re] Re: [Re] Re: Unknown winsock error 10061while dumping a big database - Mailing list pgsql-general

From Richard Huxton
Subject Re: [Re] Re: [Re] Re: [Re] Re: Unknown winsock error 10061while dumping a big database
Date
Msg-id 474DCADE.8000003@archonet.com
Whole thread Raw
In response to [Re] Re: [Re] Re: [Re] Re: Unknown winsock error 10061while dumping a big database  ("Cyril VELTER" <cyril.velter@metadys.com>)
Responses [Re] Re: [Re] Re: [Re] Re: [Re] Re: Unknown winsock error 10061while dumping a big database  ("Cyril VELTER" <cyril.velter@metadys.com>)
List pgsql-general
Cyril VELTER wrote:
>
>     I have run the following query to get all record with one field over 10MB :
>
> select
> p2,length(p18155),length(p18154),length(p4065),length(p4083),length(p4020),lengt
> h(p4074),length(p3857),length(p32402),length(p5512),length(p18175) from c2674
> where length(p18155)>10000000 or length(p18154)>10000000 or
> length(p4065)>10000000 or length(p4083)>10000000 or length(p4020)>10000000 or
> length(p4074)>10000000 or length(p3857)>10000000 or length(p32402)>10000000 or
> length(p5512)>10000000 or length(p18175)>10000000;
>
>     The biggest value is 28034379.
>
>     Is length() supposed to return the very high length in case of corruption ?

You'd have thought it would. The odd thing (if it is data corruption) is
that you would expect to see something in the server logs about a
failure to allocate 12345412234124 bytes of memory or some such. Whereas
all you get is this winsock error.

>     Is there anythning else i can do ?

Could you try CREATE some_table AS SELECT * FROM c2674 WHERE ... to copy
the large rows within the database. If that fails, the table is
corrupted but you can identify the problem rows and work around them
while you dump the data.

If it doesn't fail, that suggests (to me, anyway) you've found a bug
somewhere in the communication between server and client (which would
explain the winsock error).

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Recheck condition
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] plperl and regexps with accented characters - incompatible?