Skip site navigation (1) Skip section navigation (2)

Unix domain sockets

From: Randy Neumann <Randy_Neumann(at)centralref(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Unix domain sockets
Date: 2002-09-06 15:54:58
Message-ID: 200209061557.JAA34665@mail.simn.com (view raw or flat)
Thread:
Lists: pgsql-novice
I have written a function that will allow connections to the postgresql 
database using tcp/ip sockets written in 'C'.  I have one application (still 
in load testing phase) that runs fine and I can still access the database 
using psql on unix domain sockets for the first couple of days.  All this 
application is doing is inserting records to the postgres database and doing 
some querys.  However after about 3 days I start to get the error:

psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

My application is still happy, and I can see the postgres process that I am 
using is still chugging away.  I have also installed postgres on another 
machine and established that psql will connect using tcp/ip to the host and 
database I am trying to connect to with unix domain sockets.  When my 
application completes and I down postmaster and restart it everything is OK 
again.  Problem is I consider downing a database as the next thing to a 
hardware fault even if it is controlled.

My next step is to add this host to pg_hba.conf and see if I can connect by 
specifing the host as an option to psql.

Can anyone point me to the correct e-mail list or does anyone have any ideas 
as to what could cause this?

Thanks, Randy

pgsql-novice by date

Next:From: Josh BerkusDate: 2002-09-06 18:54:45
Subject: Re: References on arrays
Previous:From: Juliet MayDate: 2002-09-05 18:31:01
Subject: PHPCON2002

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group