> There's a possible DoS attack when someone else comes first and creates a
> file /tmp/.s.PGSQL.5432. But detecting whether there's another program
> running on that socket (if it's a socket) isn't going to help because you
> most likely won't be able to delete it anyway. The solution to this is to
> make the path of the socket file configurable more easily so that the
> administrator has the choice of putting it a safer place that he prepared
> appropriately.
If you are worried about DoS, I think the only solution is to figure out
a way to be using one of the reserved <1000 ports. I don't think there's
any way around that is there? Also presumably not using a reserved port
is a security risk. Not that I'm worried.