Re: Re: pg_restore fails on Windows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom Tom <cobold(at)seznam(dot)cz>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: pg_restore fails on Windows
Date: 2008-08-18 17:18:17
Message-ID: 1178.1219079897@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?us-ascii?Q?Tom=20Tom?= <cobold(at)seznam(dot)cz> writes:
> Magnus Hagander wrote:
>> Attached is a pg_restore.exe off CVS tip today, which should include the
>> patch. Please try this one.

> I tested the restore using the provided pg_restore.exe. The output is:

> pg_restore: [archiver (db)] could not execute query: could not send data to server: No buffer space available (0x00002747/10055)

According to
http://support.microsoft.com/kb/201213
this is an acknowledged bug that's been broken since Windows 95, so
I suppose we should conclude that M$ is unwilling or incompetent to
fix it.

Possibly the best workaround is something like

+ #ifndef WIN32
sent = pqsecure_write(conn, ptr, len);
+ #else
+ /* Windows tends to fail on large sends, see KB 20213 */
+ sent = pqsecure_write(conn, ptr, Min(len, 65536));
+ #endif

in pqSendSome(). The backend seems to not be subject to a similar
problem because it's already filtering its output through a limited-size
buffer.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Figueiredo Jr. 2008-08-18 17:47:30 Re: Postres.exe Processes Hang
Previous Message Scott Marlowe 2008-08-18 15:38:27 Re: failed to re-find parent key in "..."