From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: abstract Unix-domain sockets |
Date: | 2020-10-22 07:03:49 |
Message-ID: | 4ea6f358-2543-2536-fff7-8351ebb7be31@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Updated patch set after some conflicts had emerged.
On 2020-10-09 09:28, Peter Eisentraut wrote:
> During the discussion on Unix-domain sockets on Windows, someone pointed
> out[0] abstract Unix-domain sockets. This is a variant of the normal
> Unix-domain sockets that don't use the file system but a separate
> "abstract" namespace. At the user interface, such sockets are
> represented by names starting with "@". I took a look at this and it
> wasn't hard to get working, so here is a patch. It's supposed to be
> supported on Linux and Windows right now, but I haven't tested on Windows.
>
> I figure, there are so many different deployment options nowadays, this
> could be useful somewhere. It relieves you from dealing with the file
> system, you don't have to set up /tmp or something under /var/run, you
> don't need to make sure file system permissions are right. Also, there
> is no need for a lock file or file cleanup. (Unlike file-system
> namespace sockets, abstract namespace sockets give an EADDRINUSE when
> trying to bind to a name already in use.) Conversely, of course, you
> don't get to use file-system permissions to manage access to the socket,
> but that isn't essential functionality, so it's a trade-off users can
> make on their own.
>
> And then some extra patches for surrounding cleanup. During testing I
> noticed that the bind() failure hint "Is another postmaster already
> running ..." was shown in inappropriate situations, so I changed that to
> only show for EADDRINUSE errors. (Maybe other error codes could be
> appropriate, but I couldn't find any more.)
>
> And then looking for other uses of EADDRINUSE I found some dead
> Windows-related code that can be cleaned up.
This last piece has been committed.
>
>
> [0]:
> https://www.postgresql.org/message-id/20191218142419.fvv4ikm4wq4gnkco@isc.upenn.edu
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Add-support-for-abstract-Unix-domain-sockets.patch | text/plain | 10.3 KB |
v2-0002-Make-error-hint-from-bind-failure-more-accurate.patch | text/plain | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | tsunakawa.takay@fujitsu.com | 2020-10-22 07:31:55 | RE: [Patch] Optimize dropping of relation buffers using dlist |
Previous Message | Michael Paquier | 2020-10-22 06:52:01 | Re: [patch] Fix checksum verification in base backups for zero page headers |