Re: abstract Unix-domain sockets - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: abstract Unix-domain sockets
Date
Msg-id a6173454-b5d3-c608-4f53-4888b969f446@2ndquadrant.com
Whole thread Raw
In response to Re: abstract Unix-domain sockets  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
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/



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: abstract Unix-domain sockets
Next
From: Fujii Masao
Date:
Subject: Re: [PATCH] Add features to pg_stat_statements