Radoslaw Zielinski <radek42(at)gmail(dot)com> writes:
> "pg_ctl -w -D ... start" doesn't work when unix_socket_directory is set
> to somewhere else than the compiled in default ("/tmp").
pg_ctl not working is going to be the very least of your worries;
pretty much nothing else will either.
If you want some other socket directory, I strongly recommend setting
the path to it at compile time so that it's properly wired into libpq.
AFAICS the only value in specifying unix_socket_directory at server
start is if you actually *want* a stealth server that won't be found
by clients without manual intervention.
regards, tom lane