[HACKERS] max_files_per_process ignored on Windows

2012-03-28 Thread Heikki Linnakangas
At postmaster startup, we determine the maximum number of open files we can handle by trying to open a lot of file descriptors, up to max_files_per_process. This is done in set_max_safe_fds(), and the determined max_safe_fds value is inherited by child processes at fork(). However, with

Re: [HACKERS] max_files_per_process ignored on Windows

2012-03-28 Thread Magnus Hagander
On Wed, Mar 28, 2012 at 18:12, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: At postmaster startup, we determine the maximum number of open files we can handle by trying to open a lot of file descriptors, up to max_files_per_process. This is done in set_max_safe_fds(), and the

Re: [HACKERS] max_files_per_process ignored on Windows

2012-03-28 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Mar 28, 2012 at 18:12, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: An obvious fix would be to call set_max_safe_fds() in the child processes, although I wonder if that's too expensive. Another option is to pass down the