Re: Moving lock file (/tmp/.s.PGSQL.<port>)

From: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
To: Madison Kelly <linux(at)alteeve(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Moving lock file (/tmp/.s.PGSQL.<port>)
Date: 2007-11-30 10:53:58
Message-ID: 20071130105355.GA2552@batory.org.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 30 Nov 2007, Madison Kelly wrote:

> If there a ./configure switch (or config file/command line switch) to
> tell postgresql to put the lock file '.s.PGSQL.<port>.lock' and socket
> '.s.PGSQL.<port>' in a different directory?

There's no ./configure option, so you should change
DEFAULT_PGSOCKET_DIR in ./src/include/pg_config_manual.h
If every client is linked (preferably dynamically) with libpq, which
is compiled with changed DEFAULT_PGSOCKET_DIR, then this would work
with no special configuration.

Alternatively there's a command line switch "-k" or
"unix_socket_directory" config option for postgres server:
http://www.postgresql.org/docs/8.2/interactive/runtime-config-connection.html

And PGHOST environment variable for clients:
http://www.postgresql.org/docs/8.2/interactive/libpq-envars.html

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
Winnie the Pooh

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Postgres User 2007-11-30 11:27:47 Re: Record variable not behaving as expected (bug?)
Previous Message A. Kretschmer 2007-11-30 10:35:53 Re: Moving lock file (/tmp/.s.PGSQL.<port>)