Hi gang,
So, I set up databases/postgresql16-client (and the server of course) and everything runs fine. By default PostgreSQL places its socket files in /tmp which is something I'm not really a fan of, so I edited postgresql.conf, changed unix_socket_directories and all is well.
But... psql continues to look for the socket files in /tmp. A quick peek in psql(1) led me to psqlrc which can either be used globally or on a per-user basis (~/.psqlrc (<= fixed typoe)). The only problem: for some reason psql completely ignores this:
For now I temporarily resolved the issue by adding "export PGHOST=/var/run/postgresql" to /etc/profile but even so, it doesn't explain why the default config file gets fully ignored.
Anyone got an idea? Bug or... something I overlooked?
So, I set up databases/postgresql16-client (and the server of course) and everything runs fine. By default PostgreSQL places its socket files in /tmp which is something I'm not really a fan of, so I edited postgresql.conf, changed unix_socket_directories and all is well.
But... psql continues to look for the socket files in /tmp. A quick peek in psql(1) led me to psqlrc which can either be used globally or on a per-user basis (~/.psqlrc (<= fixed typoe)). The only problem: for some reason psql completely ignores this:
Code:
peter@bsd:/usr/local/etc/postgresql $ cat psqlrc
--host /var/run/postgresql
peter@bsd:/usr/local/etc/postgresql $ pg_config --sysconfdir
/usr/local/etc/postgresql
peter@bsd:/usr/local/etc/postgresql $ truss -o ~/sql.dump psql
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
peter@bsd:/usr/local/etc/postgresql $ grep sqlrc /home/peter/sql.dump
peter@bsd:/usr/local/etc/postgresql $
Anyone got an idea? Bug or... something I overlooked?