From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Inherit max_safe_fds to child processes in EXEC_BACKEND mode. |
Date: | 2012-03-29 05:25:57 |
Message-ID: | E1SD7rx-0007V8-CC@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/5762a4d9098ac0cba789ddd26286ac85c2d316f2
Modified Files
--------------
src/backend/postmaster/postmaster.c | 3 +++
src/backend/storage/file/fd.c | 2 +-
src/include/storage/fd.h | 5 +++++
3 files changed, 9 insertions(+), 1 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2012-03-29 08:13:00 | pgsql: Unbreak Windows builds broken by pgpipe removal. |
Previous Message | Andrew Dunstan | 2012-03-29 03:24:59 | pgsql: Remove now redundant pgpipe code. |