| From: | Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Connecting to a postgreSQL database with windows CE over wi-fi; failing gracefully | 
| Date: | 2009-05-01 15:31:25 | 
| Message-ID: | db471ace0905010831vfdb6474ua0b046c8be2a22ae@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2009-05-01 15:50:21 | Re: Understand this error | 
| Previous Message | Tom Lane | 2009-05-01 15:09:58 | Re: Do TEMP Tables have an OID? Can this be a problem if used too frequently? |