mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Inherit max_safe_fds to child processes in EXEC_BACKEND mode.
Postmaster sets max_safe_fds by testing how many open file descriptors it can open, and that is normally inherited by all child processes at fork(). Not so on EXEC_BACKEND, ie. Windows, however. Because of that, we effectively ignored max_files_per_process on Windows, and always assumed a conservative default of 32 simultaneous open files. That could have an impact on performance, if you need to access a lot of different files in a query. After this patch, the value is passed to child processes by save/restore_backend_variables() among many other global variables. It has been like this forever, but given the lack of complaints about it, I'm not backpatching this.
This commit is contained in:
@ -103,7 +103,7 @@ int max_files_per_process = 1000;
|
||||
* Note: the value of max_files_per_process is taken into account while
|
||||
* setting this variable, and so need not be tested separately.
|
||||
*/
|
||||
static int max_safe_fds = 32; /* default if not changed */
|
||||
int max_safe_fds = 32; /* default if not changed */
|
||||
|
||||
|
||||
/* Debugging.... */
|
||||
|
Reference in New Issue
Block a user