Re: How to check for server availability? [v9.3.1, Linux]

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: How to check for server availability? [v9.3.1, Linux]
Дата
Msg-id CAOR=d=1mddCMgquZ9+vUm0bS8sA8gkMT=t1S6iezkgkym6eurw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to check for server availability? [v9.3.1, Linux]  (Chris Angelico <rosuav@gmail.com>)
Список pgsql-general
On Fri, May 18, 2012 at 8:18 AM, Chris Angelico <rosuav@gmail.com> wrote:
> On Sat, May 19, 2012 at 12:09 AM, Vincenzo Romano
> <vincenzo.romano@notorand.it> wrote:
>> You said enough about PQstatus. So issuing a "blank" command seems to
>> be a good idea. Possibly the only one.
>>
>> Well, a "ping" function trying to use the current "PGconn*" to ping
>> the server would make a lot of sense, though.
>
> If it helps make your code clearer, you could send the query "/* ping
> */", which would be parsed by the server as a comment. I've not
> verified, but a recent thread here mentioned that /**/ comments
> (unlike double-hyphen ones) get sent to the server, so you'll see it
> in your logs.

Or send the command:

select 1;

В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Blackwell
Дата:
Сообщение: Log: Untranslatable character: no DETAIL
Следующее
От: Aaron Burnett
Дата:
Сообщение: odd intermittent query hanging issue