On 2020-11-24 16:49, David G. Johnston wrote:
> On Tue, Nov 24, 2020 at 8:45 AM Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com
> <mailto:peter.eisentraut@2ndquadrant.com>> wrote:
>
> We're subject to whatever the kernel behavior is. If the kernel
> doesn't
> report address conflicts for Unix-domain sockets, then we can't do
> anything about that. Having an error message ready in case the kernel
> does report such an error is not useful if it never does.
>
>
> It's a file, we can check for its existence in user-space.
But not without race conditions. That's why we have the separate lock
file, so we can do this properly.
Also, even if one were to add code to check the file existence first,
this would be separate code and would not affect the behavior of the
bind() call that we are discussing here.
--
Peter Eisentraut
2ndQuadrant, an EDB company
https://www.2ndquadrant.com/