On 03/05/2014 09:50 AM, Christoph Berg wrote: > Re: Daniel Kahn Gillmor 2014-03-04 <531641aa.7040...@fifthhorseman.net> >> have you looked at all into the idea of a socket-activated postgresql >> for those initsystems that can handle socket activation? > > I think it would be a nice idea, but would that work with PostgreSQL? > My impression was that it needs a daemon that takes connections on > stdin instead of opening a socket itself.
It doesn't need to be stdin by default -- it could be another file descriptor (or several other file descriptors, for daemons that listen on multiple sockets). This would definitely require coordination from postgresql upstream, though. i don't think the postgres binary supports this yet. it might be worth raising to upstream at some point though. socket activation is nice for at least three reasons: 0) the process supervisor can hold the relevant sockets open so that no other processes can grab them, even while the server in question is being re-started). 1) for daemons that want to listen on reserved TCP or UDP ports (i.e. below 1024), the process supervisor can open the ports, and then the daemon itself can be run as a non-privileged user. 2) clients can establish a connection during a service restart, and just have a delayed application-layer handshake, instead of getting "port closed" messages. --dkg
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Pkg-postgresql-public mailing list Pkg-postgresql-public@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public