Hi all. I'd need to check from a C language program whether the server is running or not. I was planning to use either "PGPing PQping(const char *conninfo)" or "ConnStatusType PQstatus(const PGconn *conn)". I have my program running and checking from time to time whether the connection is kicking and alive. In order to test the things I've done the following: while the program is waiting for input I simply restart the postgresql server. The issue is thayt both functions return PQPING_OK and CONNECTION_OK respectively. When I forward the request, I get an error: "FATAL: terminating connection due to administrator command". How can I reliably check the server status? TIA: -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[Postgresql Jobs] [Postgresql Admin] [Postgresql Performance] [Linux Clusters] [PHP Home] [PHP on Windows] [Programming PHP] [Kernel Newbies] [PHP Classes] [Find Someone Nice] [PHP Books] [PHP Databases] [Postgresql & PHP] [Yosemite]
![]() |
![]() |