On 2018-Aug-09, Tom Lane wrote:

> It sounds like whoever wrote that code was completely impervious to the
> API spec for AllocateFile():
> 
>  * Note that files that will be open for any significant length of time
>  * should NOT be handled this way, since they cannot share kernel file
>  * descriptors with other files; there is grave risk of running out of FDs
>  * if anyone locks down too many FDs.
> 
> Perhaps these files should be accessed through fd.c's VFD infrastructure
> rather than ignoring it.  Reinventing it is especially not the way to go.

Ah, right.  Maybe ReorderBufferRestoreChanges should use
PathNameOpenFile / FileRead ...

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to