Re: /tmp/.s.PGSQL.${PGPORT} - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: /tmp/.s.PGSQL.${PGPORT}
Date
Msg-id 22269.966663347@sss.pgh.pa.us
Whole thread Raw
In response to /tmp/.s.PGSQL.${PGPORT}  ("Jim O'Rourke" <JimO@Routescape.com>)
List pgsql-interfaces
"Jim O'Rourke" <JimO@Routescape.com> writes:
> Is anybody else having problems with the /tmp/.s.PGSQL.${PGPORT} file being
> removed by �cleantmp� et al.  

> /tmp is a dumping ground that rightly gets cleaned out periodically.

/tmp is a damfool place to have put the socket file, no doubt about that.
But we are stuck with it now if we don't want to break existing
applications --- the location of the socket file is a critical hardwired
part of the wire-level protocol, since the client and server MUST both
know it *before* any communication happens.

This was argued back around 6.4, IIRC, and we decided to do nothing.
The argument in favor of doing nothing seems even stronger now, with a
couple more years worth of existing clients out there...

Solutions:

1. Tweak your tmp-cleaning cron job to not remove the socket file.

2. Use IP instead of Unix-socket connections, so that your clients
don't care whether the socket file is there or not.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: Truble with version 1.9.0 of pgsql_perl5
Next
From: "Joao Figueiredo"
Date:
Subject: OBDC and Postgres v. 7