Re: Cursor timeout in postgres - Mailing list pgsql-general

From Tim Tassonis
Subject Re: Cursor timeout in postgres
Date
Msg-id 45C8C25C.6000505@cubic.ch
Whole thread Raw
In response to Re: Cursor timeout in postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Cursor timeout in postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi Tom

Tom Lane wrote:
> Tim Tassonis <timtas@cubic.ch> writes:
>> When examining strange behaviour in one of my programs I found out that
>> I must have somehow gotten into a timeout situation when fetching rows
>> from a cursor. My program read the first row, did some stuff for six
>> minutes and then tried to fetch the second row, which failed. The
>> connection however was still alive and further database access in the
>> program worked m'kay.
>
> Failed how, exactly?  Did anything show up in the postmaster log?

Forgot to check that, sorry. From my program's point of view, it failed
silently. When an odbc_exec() succeeds, one generally just loops over
the rows by odbc_fetch_row(), until it fails. The fetch might have
returned a message, but this was not checked, as odbc_fetch_row() is
bound to fail anyway when no more rows are present.

I try to reproduce the situation tomorrow and will also check on any
odbc_errmsg() messages and the postmaster log.

Bye
Tim


pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: PostgreSQL/FireBird
Next
From: Tom Lane
Date:
Subject: Re: Cursor timeout in postgres