Re: [HACKERS] Unportable implementation of background worker start

Поиск
Список
Период
Сортировка
Искать
От
Andres Freund
Тема
Re: [HACKERS] Unportable implementation of background worker start
Дата
Msg-id
20170420235919.rtvj4keihhgbfbek@alap3.anarazel.de
Ответ на
Список
Дерево обсуждения
[HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Rémi Zara <remi_zara@mac.com>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Andres Freund <andres@anarazel.de>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Unportable implementation of background worker start Tom Lane <tgl@sss.pgh.pa.us>
On 2017-04-20 19:53:02 -0400, Tom Lane wrote:
> I wrote:
> > Andres Freund  writes:
> >> On 2017-04-20 19:23:28 -0400, Tom Lane wrote:
> >>> or are the HANDLEs in a Windows WaitEventSet not inheritable
> >>> resources?
> 
> >> So that kind of sounds like it should be doable.
> 
> > Ah, good.  I'll add a comment about that and press on.
> 
> So ... what would you say to replacing epoll_create() with
> epoll_create1(EPOLL_CLOEXEC) ?  Then a WaitEventSet would not
> represent inheritable-across-exec resources on any platform,
> making it a lot easier to deal with the EXEC_BACKEND case.
> 
> AFAIK, both APIs are Linux-only, and epoll_create1() is not much
> newer than epoll_create(), so it seems like we'd not be giving up
> much portability if we insist on epoll_create1.

I'm generally quite in favor of using CLOEXEC as much as possible in our
tree.  I'm a bit concerned with epoll_create1's availability tho - the
glibc support for it was introduced in 2.9, whereas epoll_create is in
2.3.2.  On the other hand 2.9 was released 2008-11-13.   If we remain
concerned we could just fcntl(fd, F_SETFD, FD_CLOEXEC) instead - that
should only be like three lines more code or such, and should be
available for a lot longer.

- Andres


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Tom Lane
Дата:
FAQ