Re: 2pc leaks fds

Поиск
Список
Период
Сортировка
Искать
От
Antonin Houska
Тема
Re: 2pc leaks fds
Дата
Msg-id
70058.1586330797@antos
Ответ на
Re: 2pc leaks fds (Antonin Houska)
Список
Дерево обсуждения
2pc leaks fds Andres Freund <andres@anarazel.de>
Re: 2pc leaks fds Michael Paquier <michael@paquier.xyz>
Re: 2pc leaks fds Andres Freund <andres@anarazel.de>
Re: 2pc leaks fds Antonin Houska <ah@cybertec.at>
Re: 2pc leaks fds Andres Freund <andres@anarazel.de>
Re: 2pc leaks fds Andres Freund <andres@anarazel.de>
Re: 2pc leaks fds Michael Paquier <michael@paquier.xyz>
Re: 2pc leaks fds Antonin Houska <ah@cybertec.at>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Andres Freund <andres@anarazel.de>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Antonin Houska <ah@cybertec.at>
Re: 2pc leaks fds Alvaro Herrera <alvherre@2ndquadrant.com>
Re: 2pc leaks fds Ahsan Hadi <ahsan.hadi@gmail.com>
Re: 2pc leaks fds Antonin Houska <ah@cybertec.at>
Antonin Houska  wrote:

> Andres Freund  wrote:
> > But I'm not sure it's quite the right idea. I'm not sure I fully
> > understand the design of 0dc8ead46, but it looks to me like it's
> > intended to allow users of the interface to have different ways of
> > opening files. If we just close() the fd that'd be a bit more limited.
> 
> It should have allowed users to have different ways to *locate the segment*
> file. The WALSegmentOpen callback could actually return file path instead of
> the file descriptor and let WALRead() perform the opening/closing, but then
> the WALRead function would need to be aware whether it is executing in backend
> or in frontend (so it can use the correct function to open/close the file).

Well, #ifdef FRONTEND can be used to distinguish the caller of
WALRead(). However now that I tried to adjust the API, I see that
pg_waldump.c:WALDumpOpenSegment uses specific logic to open the file. So if
the callback only returned the file name, there would be no suitable place for
the things that WALDumpOpenSegment does.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


В списке pgsql-hackers по дате отправления
От: Masahiko Sawada
Дата:
От: Kuntal Ghosh
Дата:
FAQ