File descriptors inherited by restore_command

Поиск
Список
Период
Сортировка
От David Steele
Тема File descriptors inherited by restore_command
Дата
Msg-id 7936c364-f7e6-5f1b-2b6e-243b40e8525c@pgmasters.net
обсуждение исходный текст
Ответы Re: File descriptors inherited by restore_command  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hackers,

While investigating "Too many open files" errors reported in our
parallel restore_command I noticed that the restore_command can inherit
quite a lot of fds from the recovery process.  This limits the number of
fds available in the restore_command depending on the setting of system
nofile and Postgres max_files_per_process.

I was wondering if we should consider closing these fds before calling
restore_command?  It seems like we could do this by forking first or by
setting FD_CLOEXEC using fcntl() or O_CLOEXEC on open() where available.

Thoughts on this?  Is this something we want to change or should I just
recommend that users set nofile and max_files_per_process appropriately?

Regards,
-- 
-David
david@pgmasters.net



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mahesh S
Дата:
Сообщение: Google Season of Docs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: File descriptors inherited by restore_command