Closed shunza closed 6 years ago
Works fine for me with a recent version of PostgreSQL
please specify what exactly fails for you. Also which of the four parameters are considered problematic by you.
Otherwise I suggest to close this issue.
$ /bin/echo -e "\\\timing \n select 1" | psql -qAtX -h 127.0.0.1 -p 5432 -U postgres -d db | tail -n 1 | cut -d' ' -f2
0.319
$ psql --version
psql (PostgreSQL) 10.1
please re-open in case problem still exists for you and provide more details
Hi, Just now, I used yours postgresql template, I found pg.ping has no data. I found an error in your config files. In your file , you written "UserParameter=pgsql.ping[*],/bin/echo -e "\timing \n select 1" | psql -qAtX $1 |grep Time |cut -d' ' -f2" . Run User Parameter ,you will found you can't get a time, because "psql -qAtX" and "psql" has different . so you should delete "-qAtX" from here ensure to get a run-time value.
if you has any other problem, email to me. Email: yashun.ren@gmail.com
thanks.