Re: postgres operational

2019-01-09 Thread Martín Marqués
El 9/1/19 a las 17:38, Ron escribió: > On 1/9/19 12:19 PM, Martín Marqués wrote: >> El 9/1/19 a las 14:58, Steve Clark escribió: >>> Hi List, >>> >>> Is there a sure fire way to tell if postgres server is up an >>> operational. I was testing to see if the >>> socket at /tmp/.s.PGSQL.5432 existed -

Re: postgres operational

2019-01-09 Thread Ron
On 1/9/19 12:19 PM, Martín Marqués wrote: El 9/1/19 a las 14:58, Steve Clark escribió: Hi List, Is there a sure fire way to tell if postgres server is up an operational. I was testing to see if the socket at /tmp/.s.PGSQL.5432 existed - but I ran into a recent problem on CentOS 7.5, postgresq

Re: postgres operational

2019-01-09 Thread Martín Marqués
El 9/1/19 a las 14:58, Steve Clark escribió: > Hi List, > > Is there a sure fire way to tell if postgres server is up an operational. I > was testing to see if the > socket at /tmp/.s.PGSQL.5432 existed - but I ran into a recent problem on > CentOS 7.5, postgresql 9.2.24, where the > socket was

RE: postgres operational

2019-01-09 Thread Scot Kreienkamp
The best way I came up with for older versions is:If timeout -s 9 10 psql -d DBNAME -c "select 1" >/dev/null ; then And on newer versions, use the pg_isready command. Scot Kreienkamp |Senior Systems Engineer | La-Z-Boy Corporate One La-Z-Boy Drive| Monroe, Michigan 48162 | Office: 734