Thread: support for Unix Domain socket
Hi All,
Could someone tell me how to configure JDBC connection to use unix domain socket?
I'm planning to use it with Postgres server version 9.3.8 on Suse.
Thanks,
Raj
Interestingly enough the docs didn't get put up, but you can look here https://github.com/pgjdbc/www/pull/17/files
On 25 February 2016 at 11:11, Raj Gandhi <raj01gandhi@gmail.com> wrote:
Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj
Thanks for the quick response.
Any recommendation of which custom socket factory to use for Unix domain socket?
A quick search showed me "junixsocket" https://code.google.com/archive/p/junixsocket
Thanks,
Raj
On Thu, Feb 25, 2016 at 11:19 AM, Dave Cramer <pg@fastcrypt.com> wrote:
Interestingly enough the docs didn't get put up, but you can look here https://github.com/pgjdbc/www/pull/17/filesOn 25 February 2016 at 11:11, Raj Gandhi <raj01gandhi@gmail.com> wrote:Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj
No idea. Perhaps the author of the PR can help you.
On 25 February 2016 at 12:13, Raj Gandhi <raj01gandhi@gmail.com> wrote:
Thanks for the quick response.Any recommendation of which custom socket factory to use for Unix domain socket?A quick search showed me "junixsocket" https://code.google.com/archive/p/junixsocketThanks,RajOn Thu, Feb 25, 2016 at 11:19 AM, Dave Cramer <pg@fastcrypt.com> wrote:Interestingly enough the docs didn't get put up, but you can look here https://github.com/pgjdbc/www/pull/17/filesOn 25 February 2016 at 11:11, Raj Gandhi <raj01gandhi@gmail.com> wrote:Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj
Interestingly enough the docs didn't get put up, but you can look here https://github.com/pgjdbc/www/pull/17/files
On 25 February 2016 at 11:11, Raj Gandhi <raj01gandhi@gmail.com> wrote:
Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj
Thanks for the quick response.
Any recommendation of which custom socket factory to use for Unix domain socket?
A quick search showed me "junixsocket" https://code.google.com/archive/p/junixsocket
Thanks,
Raj
On Thu, Feb 25, 2016 at 11:19 AM, Dave Cramer <pg@fastcrypt.com> wrote:
Interestingly enough the docs didn't get put up, but you can look here https://github.com/pgjdbc/www/pull/17/filesOn 25 February 2016 at 11:11, Raj Gandhi <raj01gandhi@gmail.com> wrote:Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj
No idea. Perhaps the author of the PR can help you.
On 25 February 2016 at 12:13, Raj Gandhi <raj01gandhi@gmail.com> wrote:
Thanks for the quick response.Any recommendation of which custom socket factory to use for Unix domain socket?A quick search showed me "junixsocket" https://code.google.com/archive/p/junixsocketThanks,RajOn Thu, Feb 25, 2016 at 11:19 AM, Dave Cramer <pg@fastcrypt.com> wrote:Interestingly enough the docs didn't get put up, but you can look here https://github.com/pgjdbc/www/pull/17/filesOn 25 February 2016 at 11:11, Raj Gandhi <raj01gandhi@gmail.com> wrote:Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj
Looking at the code it seems that this function is primarily targeted towards specifying alternate SSL socket implementation, rather than UNIX sockets. There are a number of socket factories in the PostgreSQL driver:
* org.postgresql.ssl.jdbc4.LibPQFactory
* org.postgresql.ssl.NonValidatingFactory
* org.postgresql.ssl.SingleCertValidatingFactory
* org.postgresql.ssl.jdbc4.LibPQFactory
* org.postgresql.ssl.NonValidatingFactory
* org.postgresql.ssl.SingleCertValidatingFactory
and even an abstract base class:
* org.postgresql.ssl.DbKeyStoreSocketFactory
* org.postgresql.ssl.DbKeyStoreSocketFactory
The Java Socket infrastructure is quite tied up to AF_INET and seems it is infeasible that UNIX Sockets will be supported via a SocketFactory.
2016-02-25 18:11 GMT+02:00 Raj Gandhi <raj01gandhi@gmail.com>:
Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj
Looking at the code it seems that this function is primarily targeted towards specifying alternate SSL socket implementation, rather than UNIX sockets. There are a number of socket factories in the PostgreSQL driver:
* org.postgresql.ssl.jdbc4.LibPQFactory
* org.postgresql.ssl.NonValidatingFactory
* org.postgresql.ssl.SingleCertValidatingFactory
* org.postgresql.ssl.jdbc4.LibPQFactory
* org.postgresql.ssl.NonValidatingFactory
* org.postgresql.ssl.SingleCertValidatingFactory
and even an abstract base class:
* org.postgresql.ssl.DbKeyStoreSocketFactory
* org.postgresql.ssl.DbKeyStoreSocketFactory
The Java Socket infrastructure is quite tied up to AF_INET and seems it is infeasible that UNIX Sockets will be supported via a SocketFactory.
2016-02-25 18:11 GMT+02:00 Raj Gandhi <raj01gandhi@gmail.com>:
Hi All,The change log for Postgres jdbc version 9.4-1208 shows that some support was added for unix domain socketCould someone tell me how to configure JDBC connection to use unix domain socket?I'm planning to use it with Postgres server version 9.3.8 on Suse.Thanks,Raj