Clarification needed for comment in storage/file/fd.c

Поиск
Список
Период
Сортировка
От samuel cherukutty
Тема Clarification needed for comment in storage/file/fd.c
Дата
Msg-id 440033612.1090913.1521112951096@mail.yahoo.com
обсуждение исходный текст
Ответы Re: Clarification needed for comment in storage/file/fd.c  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi, 
     I came across this comment in storage/file/fd.c while I was trying to write an FDW.

" AllocateFile, AllocateDir, OpenPipeStream and OpenTransientFile are
wrappers around fopen(3), opendir(3), popen(3) and open(2), respectively.
They behave like the corresponding native functions, except that the handle
is registered with the current subtransaction, and will be automatically
closed at abort. These are intended mainly for short operations like
reading a configuration file; there is a limit on the number of files that
can be opened using these functions at any one time. "

It states that it behaves as native functions with the handle registered to the current subtransaction. 
If it is so, why is it intended for short operations?
Will it work if I open a file at the start of the transaction and close it at the end of the transaction?
What are the side effects/limitations of these functions?

Regards,
Samuel CC




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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patchfor hash index
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patchfor hash index