Andrew Dunstan <[EMAIL PROTECTED]> writes:
> ... The second part should not be 
> applied - I simply include it to illustrate the hack (taken from a 
> recent clue on the Cygwin mailing list) that I found necessary to get 
> around brokenness on the latest release of Cygwin. The good news is 
> that they do seem to be trying to find out what broke and fix it.

You mean this?

> *** src/backend/storage/file/fd.c     4 Jul 2005 04:51:48 -0000       1.118
> --- src/backend/storage/file/fd.c     7 Aug 2005 13:22:00 -0000
> ***************
> *** 327,332 ****
> --- 327,334 ----
>                               elog(WARNING, "dup(0) failed after %d 
> successes: %m", used);
>                       break;
>               }
> +             if (used >= 250)
> +                     break;
>  
>               if (used >= size)
>               {

Looking at that code, I wonder why we don't make the loop stop at
max_files_per_process opened files --- the useful result will be
bounded by that anyhow.  Actively running the system out of FDs,
even momentarily, doesn't seem like a friendly thing to do.

This wouldn't directly solve your problem unless you reduced the
default value of max_files_per_process, but at least that would
be something reasonable to do instead of hacking the code.

                        regards, tom lane

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

Reply via email to