[Techtalk] postgres, ODBC, connections

Nicole Zimmerman colby at wsu.edu
Sat Feb 22 18:40:01 EST 2003

I have an application that uses Crystal Reports with ODBC to hook into a
postgres database (on debian woody, postgres v7.2). 

When running a report that takes a long time, involves a lot of queries,
and returns a lot of data, the application on the client side crashes
(possibly running out of memory on either end?). When this happens, the
application on the client side completely closes (posting events to the
System Log in Win2k that indicates it unexpectedly quit) and there are no
connections showing through 'netstat' on that machine.

However, on the postgres server, the connection to the client is still
shown as "ESTABLISHED" and insertions into the same database stop
happening (through another process). The account running the report is a
read-only user, the account attempting inserts obviously is not. Reports
that run and exit correctly do not cause this problem, only reports that

Obviously this poses problems to database-driven applications that need to
be able to insert data no matter what is happening on the reports side.
Restarting postgres clears the connection from the user forceably, but
this isn't a very practical solution. 

Has anyone using postgres seen this before? Is there a workaround either
through postgres or through the ODBC driver itself?

Any help is appreciated.

More information about the Techtalk mailing list