Re: [GENERAL] REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432

Martijn van Oosterhout <kleptog@svana.org>

From: Martijn van Oosterhout <kleptog@svana.org>
To: Arcady Genkin <a.genkin@utoronto.ca>
Cc: Postgres-general <pgsql-general@postgresql.org>, pgsql-bugs@postgresql.org
Date: 2001-06-08T00:35:23Z
Lists: pgsql-bugs, pgsql-general
On Thu, Jun 07, 2001 at 06:02:53PM -0400, Arcady Genkin wrote:
> I asked this in -general about ten days ago, but received no replies.
> 
> Can I redefine location of the UNIX domain socket file to be other
> than /tmp/.s.PGSQL.5432?  The problem is that there is a /tmp cleaning
> script on the Solaris system where Postgres is installed, which sweeps
> away anything older than 24 hours.  Right now I'm getting away by
> having a cron job touch the file periodically, but this is not a nice
> solution.

Yes, it can be done. For example, the debian package moves it to /var/run
iirc. However, to make this work you need to patch the postmaster to put it
in a different place and patch the libpq to look for it in the new place. So
it will need a recompile at least.

> p.s.  I'm sending this also to -bugs, because I think that the
> location of the socket file should be configurable (at least at
> compile time).

Maybe it already is a #define. The debian patch should be available from the
debian website.

-- 
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/