Search Postgresql Archives

Re: [Re] Re: [Re] Re: [Re] Re: [Re] Re: Unknown winsock error 10061while dumping a big database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cyril VELTER wrote:
De : mailto:dev@xxxxxxxxxxxx
Cyril VELTER wrote:
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.

	I have another theory. The message printed by pg_dump :

	"pg_dump: Error message from server: out of memory"

is printed in dumpTableData_copy (pg_dump.c) : write_msg(NULL, "Error message from server: %s", PQerrorMessage(g_conn));

There are serveral places in libpq where the conn error might be set to "out of memory". I've also discovered that the machine running pg_dump is pretty tight in ram (256M) and that no swap file is active (oversight after a disk upgrade). May be this error is simply pg_dump running out of memory and not the server. This would also explain that the server only report a socket error (though I would have expected WSAECONNRESET (10054) instead of WSAECONNREFUSED (10061)).

Aha - that sounds likely. If you're dumping multi-megabyte rows I can see how you'd get into problems on a client with a small amount of RAM.

The 8.0.13 pg_dump used to work just fine on the exact same machine. Maybe 8.2 pg_dump need more memory (or maybe a memory leak ?).

Might just be slightly higher RAM usage in your particular case. It could be there were some trade-offs between size and speed.

I'm running the dump again after adding some swap space and will monitor memory usage.

	What do you think ?

I think you've found the problem. If you're short of RAM though you might also have difficulty restoring the dump.

You could run pg_dump on the Windows server and copy its output to the RAM-limited Linux box. You could even run pg_restore from the Windows box - if you don't have a direct channel to the database you can use the putty ssh-client to create a tunnelled connection to the Linux box.

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux