Re: Multiple UNIX-domain sockets?
От | Oliver Fromme |
---|---|
Тема | Re: Multiple UNIX-domain sockets? |
Дата | |
Msg-id | 200609251856.k8PIuujY098837@lurza.secnetix.de обсуждение исходный текст |
Ответ на | Re: Multiple UNIX-domain sockets? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Multiple UNIX-domain sockets?
|
Список | pgsql-novice |
Tom Lane wrote: > Oliver Fromme writes: > > I need to run a postgresql server with multiple UNIX-domain > > sockets, i.e. not just the one in /tmp. Is that possible > > at all? > > No ... why would you need it? See below. > (The postmaster could probably be made to do this if it was important, > but I don't see the use-case.) > > > (I had the idea to create hardlinks to the socket in /tmp, > > but unfortunately /tmp is a separate file system on a > > memory disk, so it's not possible to create hardlinks to > > somewhere else.) > > Wouldn't a symlink work? No, it wouldn't. I'm sorry, I should have explained why I need it in the first place. My operating system is FreeBSD, and it supports a feature called "jails" which is similar to chroot, but has a lot of additional functionality (separate process spaces and other things). I would like to run an untrustworthy application within such a jail. The application needs to access a database, for which I will be using PostgreSQL. However, I do not want to install postgres within the same jail, because I intend to use it for other purposes, too. In the future there might be a another application in a different jail, which also accesses a postgres database. Well, because of the chrooted environment, the application cannot access postgres' socket in /tmp. Hardlinks don't work because they're separate filesystems. Symlinks don't work because a symlink cannot point to an object outside of a jail. The only solution would be to use TCP sockets on localhost, but the TCP/IP overhead is considerably higher, especially when there are lots of small queries (which I expect). I've foiund several benchmarks in various mailinglists, some mention a factor of 10. Therefore I would definitely prefer to use UNIX-domain sockets instead, if possible. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. PI: int f[9814],b,c=9814,g,i;long a=1e4,d,e,h; main(){for(;b=c,c-=14;i=printf("%04d",e+d/a),e=d%a) while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d%g;}
В списке pgsql-novice по дате отправления: