Re: Unix domain instead of TCP socket connections with

From: Kris Jurka <books(at)ejurka(dot)com>
To: Alex Martinoff <froggle2003(at)yahoo(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unix domain instead of TCP socket connections with
Date: 2003-09-08 08:18:31
Message-ID: Pine.LNX.4.33.0309080412470.4807-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7 Sep 2003, Alex Martinoff wrote:

> Using the org.postgresql.Driver JDBC driver is it possible to connect
> to Postgres using a unix domain socket instead of a TCP socket (so you
> don't have to start the postmaster with -i)? Using a TCP socket
> instead of a unix socket seems to slow down requests that return large
> result sets by a factor of 3 on the same machine. What's the point of
> all the extra CPU overhead if you're on the same machine? A
> high-volume server can really do without the extra overhead. Also, for
> security reasons it would be slightly nicer to run Postgres without -i
> just so there's one less port popping up when you port-scan.

Java does not provide an API for dealing with unix sockets. It might
be possible to create such an interface via JNI, but I doubt you'll get
a whole lot of interest from the JDBC driver developers as the postgresql
JDBC driver is a Type IV (pure java) driver.

Is this factor of 3 difference in time the difference from running psql
over unix sockets vs tcp, or is it the difference between a Java client
and psql? If it's the latter you're not really doing an apples to apples
comparison.

Kris Jurka

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marek Lewczuk 2003-09-08 08:32:28 plPGSQL bug in function creation
Previous Message Shridhar Daithankar 2003-09-08 07:00:05 Re: Reasonable Configuration