Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully
Дата
Msg-id db471ace0905010831vfdb6474ua0b046c8be2a22ae@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Wow, a response from the famous Tom Lane to my lame problem :-) .

> What I'd try is a "ping" to the database server, and not initiate any
> libpq operation unless the server is answering pings.  If you get
> a failure due to connectivity loss midway through an operation,
> PQreset is appropriate then --- but don't do it to recover from
> a momentary network outage.

That's interesting. In general, it's hard to ping from a windows
program, unless you want to repeatedly invoke ping.exe. I'm not sure
that I can even retrieve the result of that. That strikes me as fairly
kludgey - acceptable for some utility shellscript, but probably not
for what is supposed to be a responsive program.

Perhaps it would be preferable to call the function after the
operation, but before the application reports success. I'll look into
it.

Regards,
Peter Geoghegan

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Do TEMP Tables have an OID? Can this be a problem if used too frequently?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Understand this error