client interfaces

Started by David Parkerabout 21 years ago4 messagesgeneral
Jump to latest
#1David Parker
dparker@tazznetworks.com

Is there anything like a client library for postgres that does not use
tcp/ip as the protocol? As part of the performance tuning of our
application, the question was posed to me whether there was a more
"direct" sort of API that would not require going through the tcp/ip
stack. I assume the answer to this is "no", and I see no hint of
anything in the source code, but I thought I would ask the question,
just to be sure.

Thanks.

- DAP
------------------------------------------------------------------------
----------
David Parker Tazz Networks (401) 709-5130

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: David Parker (#1)
Re: client interfaces

"David Parker" <dparker@tazznetworks.com> writes:

Is there anything like a client library for postgres that does not use
tcp/ip as the protocol?

Local connections generally go through Unix sockets, which is not the
tcp stack.

regards, tom lane

#3Michael Fuhr
mike@fuhr.org
In reply to: David Parker (#1)
Re: client interfaces

On Tue, Apr 12, 2005 at 10:51:09AM -0400, David Parker wrote:

Is there anything like a client library for postgres that does not use
tcp/ip as the protocol? As part of the performance tuning of our
application, the question was posed to me whether there was a more
"direct" sort of API that would not require going through the tcp/ip
stack. I assume the answer to this is "no", and I see no hint of
anything in the source code, but I thought I would ask the question,
just to be sure.

PostgreSQL supports connections over Unix-domain (AF_UNIX) sockets
if your system does. They still use the socket interface, but
they're typically faster than a TCP connection.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#4Bruno Wolff III
bruno@wolff.to
In reply to: David Parker (#1)
Re: client interfaces

On Tue, Apr 12, 2005 at 10:51:09 -0400,
David Parker <dparker@tazznetworks.com> wrote:

Is there anything like a client library for postgres that does not use
tcp/ip as the protocol? As part of the performance tuning of our
application, the question was posed to me whether there was a more
"direct" sort of API that would not require going through the tcp/ip
stack. I assume the answer to this is "no", and I see no hint of
anything in the source code, but I thought I would ask the question,
just to be sure.

You can use domain sockets when on the same host as the server.