Re: Exposing an installation's default value of unix_socket_directory - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Exposing an installation's default value of unix_socket_directory
Date
Msg-id m2ocanfhwu.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Exposing an installation's default value of unix_socket_directory  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
> One possible response would be to add an item to what pg_config knows
> about, eg "pg_config --socketdir".  This doesn't answer every possible
> use-case either, but it would be helpful for some scenarios.
>
> Thoughts?

Following some links one can find out http://packages.debian.org/source/unstable/postgresql-9.0
http://ftp.de.debian.org/debian/pool/main/p/postgresql-9.0/postgresql-9.0_9.0.1-1.debian.tar.gz

And check that debian package is patching src/include/pg_config_manual.h
and not using the other facility proposed in the comments:
* here's where to twiddle it.  You can also override this at runtime* with the postmaster's -k switch.

-#define DEFAULT_PGSOCKET_DIR  "/tmp"
+#define DEFAULT_PGSOCKET_DIR  "/var/run/postgresql"

But still, I wonder how this -k switch will get a role here, pg_control
certainly won't know about that. I guess it's worse to give a wrong
value rather than none, but that's easy to fix by having a good label
for the line, I guess.

All in all it would be good to have that in pg_control.
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Exposing an installation's default value of unix_socket_directory
Next
From: Greg Stark
Date:
Subject: Re: pg_rawdump