Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 417F9B5D94C for ; Mon, 27 Jun 2011 16:07:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 74236-08 for ; Mon, 27 Jun 2011 19:07:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mail.postgresql.org (Postfix) with ESMTP id A6C94B5D90E for ; Mon, 27 Jun 2011 16:07:12 -0300 (ADT) Received: from [192.168.11.145] (riosat.com [89.140.90.230]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MH5MY-1Qp2nO3qhG-00DSYf; Mon, 27 Jun 2011 21:07:01 +0200 Subject: Re: Connecting over UNIX domain sockets From: Hannu Krosing To: Phil Clay Cc: pgsql-jdbc@postgresql.org, Florian Weimer , pierce@hogranch.com In-Reply-To: <852104.71586.qm@web65506.mail.ac4.yahoo.com> References: <852104.71586.qm@web65506.mail.ac4.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 27 Jun 2011 21:06:58 +0200 Message-ID: <1309201618.2800.175.camel@hvost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:aV50ny+y7tknwVAaqXtRQJooofef1HpZXdx0zlnDjo3 dPw37vV+wHGgUMDSA5ESHM95zyBd5hpevUA9vugsRxsKObTTz4 pCos0VxUP5NShJaV6uRHy0jz6dGnlaDf0mJKtjjmA4g/EwB8cc oR7cdzwKI+7bKpsSk9rZUryqGc7Do3Y44nNutWN8eNs8+GuIen TcHIdMBCb0Ow+MjeMP9J1EEVoZKAplr9tJx0RNUo3Y= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201106/67 X-Sequence-Number: 21991 On Mon, 2011-06-27 at 12:02 -0700, Phil Clay wrote: > Apologies for resurrecting an old thread, but I'm also interested in using > domain sockets with postgres' jdbc driver. > > To any potential implementors, I wanted to point out something that might be > useful... > > The junixsocket project (http://code.google.com/p/junixsocket/) provides an > implementation of java.net.Socket that uses domain sockets. It also provides a > mysql SocketFactory so that mysql's jdbc driver can be used with domain > sockets. > However, contrary to mysql's jdbc driver, postgres' jdbc driver does not appear > to be designed in a way that a different Socket implementation could be easily > "plugged in". Hmm - does pg jdbc driver support IPv6 ? If so, is it done inside java socket library ? > If the postgres jdbc project does not want the full burden of managing the > native code required for domain socket connectivity, perhaps one approach to > take would be to refactor the postgres jdbc driver in such a way that a > different mechanism for constructing sockets could be plugged in. Then an > implementation could be provided by junixsocket, which already has the native > distribution mechanism. > > Just a thought. > > Phil > -- ------- Hannu Krosing PostgreSQL Infinite Scalability and Performance Consultant PG Admin Book: http://www.2ndQuadrant.com/books/