FD_SETSIZE limitation in Windows hamstringing pgbench.c
От | Gregory Stark |
---|---|
Тема | FD_SETSIZE limitation in Windows hamstringing pgbench.c |
Дата | |
Msg-id | 87abqb1msc.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответы |
Re: FD_SETSIZE limitation in Windows hamstringing pgbench.c
|
Список | pgsql-hackers |
This change in pgbench.c: revision 1.71 date: 2007-08-25 10:21:14 +0100; author: ishii; state: Exp; lines: +7 -2; The upper limit for -c optionof pgbench is now obtained from (FD_SETSIZE - 10) rather than a hardwired number. Turns out to be, perhaps, ill-advised on Windows where FD_SETSIZE defaults to 64 but can be adjusted by #defining it before including winsock.h. At least that's what I'm reading on google, I don't know have a Windows machine to test with myself. But it's definitely true that on Windows you get an error if you try to run pgbench with more than 54 clients. I think this can be solved by simply adding this: --- pgbench.c 27 Sep 2007 21:39:43 +0100 1.72 +++ pgbench.c 22 Oct 2007 10:55:57 +0100 @@ -24,6 +24,7 @@#include <ctype.h>#ifdef WIN32 +#define FD_SETSIZE 1024#include <win32.h>#else#include <sys/time.h> But as I said, I can't test it conveniently. Plus Postgres currently is bombing out with more than 45 clients anyways due to the handles issue that others are looking into (hence finding this limitation). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: