Closed MichaelDBA closed 6 years ago
Thanks for reporting. Can you try:
PGSYSCONFDIR= pgmetrics -h 127.0.0.1 -p 5441 -U postgres --no-password example
Is PGSYSCONFDIR set usually?
Also, if SSL connection is required, then:
PGSSLMODE=require PGSYSCONFDIR= pgmetrics -h 127.0.0.1 -p 5441 -U postgres --no-password example
echo $PGSYSCONFDIR /etc/postgresql-common
Thanks. Fixed in f7d944f. As a workaround, you've to unset (not just clear like I said above) the env. var.:
unset PGSYSCONFDIR
pgmetrics -h 127.0.0.1 -p 5441 -U postgres --no-password example
That gets around the problem, but creates another side issue: pg_createcluster will not be able to find cluster defaults (create_cluster.conf) in the /etc/postgresql-common directory.
So I guess the workaround is unset PGSYSCONFDIR, and then set it again after executing pgmetrics.
Yes. You could also have a script:
#!/bin/bash
unset PGSYSCONFDIR
pgmetrics $@
or run it in parenthesis:
(unset PGSYSCONFDIR; pgmetrics -h 127.0.0.1 -p 5441 -U postgres --no-password example)
to avoid setting it back again.
Thanks.
I have the right entries in .pgpass so this works: