Connection problem with 8 Beta 5 - Mailing list pgsql-novice

From George Weaver
Subject Connection problem with 8 Beta 5
Date
Msg-id 003401c4e6bc$7673b0b0$6400a8c0@Dell4500
Whole thread Raw
Responses Re: Connection problem with 8 Beta 5
List pgsql-novice
If this should be directed to another list, please let me know.

First, I want to compliment everyone that has contributed to the development of 8.0.  I recently installed Beta 5 (on XP without a hitch) and have been very impressed with its performance and features.  I have subscribed to the pgsql-hackers-win32 list since last January and can appreciate the challenges you've overcome in making this happen.  Excellent work!

I have run into a problem testing Beta 5 using an existing application on XP.

The application is a VB.NET application that uses PostgreSQL as the backend connecting via psqlodbc.  It has been built and runs fine on 7.3.4 via Cygwin on XP and Server 2000.

The testing has been with psqlodbc version 8.00.00.02 that installs with Beta 5.

The application has a number of user input forms that make extensive use of dropdown combo boxes populated from tables in the database (one form has 8 combo boxes, another 15, and another over 20).  The boxes are populated via a query sent to the database.  A connection is opened to the database, the query executed, the data returned, and the connection closed.  This process occurs for each combobox.

When I run the application through the IDE in .NET there are no problems.  In fact, the speed of retrieval is remarkably enhanced compared to 7.3.4.  A form that used to take 7 seconds plus to load now loads in 2 seconds or less!

However when I run from the .exe version directly I get an inconsistent problem that results in Windows having to shut down the application. The problem occurs when a form is populating the combo boxes while loading. Most times the forms load without problem.  At other times I encounter the Microsoft "Test.exe has encountered a problem and needs to close..." dialog box. 
 
All data access processes occur within Try - Catch structures, but they are not trapping this problem.

When this happens the database log shows:

2004-12-20 10:11:12 LOG:  could not receive data from client: No connection
could be made because the target machine actively refused it.

2004-12-20 10:11:12 LOG:  unexpected EOF on client connection
2004-12-20 10:11:12 LOG:  could not receive data from client: No connection
could be made because the target machine actively refused it.

2004-12-20 10:11:12 LOG:  unexpected EOF on client connection
2004-12-20 10:11:12 LOG:  could not receive data from client: No connection
could be made because the target machine actively refused it.

2004-12-20 10:11:12 LOG:  unexpected EOF on client connection

The Windows event log shows two errors for each of the above occurrences:

Event Type: Error
Event Source: Application Error
...
Description:
Faulting application test.exe, version 1.0.1813.27448, faulting module
psqlodbc.dll, version 8.0.0.2, fault address 0x0002001f.

Event Type: Error
Event Source: COM+
...
Description:
The system has called a custom component and that component has failed and
generated an exception. This indicates a problem with the custom component.
Notify the developer of this component that a failure has occurred and
provide them with the information below.
Component Prog ID: 0[ODBC][C:\WINDOWS\System32\psqlodbc.dll]
Method Name: IDispenserDriver::CreateResource
Process Name: test.exe
Exception: C0000005
Address: 0x0366001F
Call Stack:
psqlodbc!SQLGetDiagFieldW + 0x29F

Would this be an issue arising within my application?  Is it a psqlodbc bug and should it be directed to the pgsqlodbc project as a bug?  The Microsoft event log seems to point at psqlodbc but the database log seems to point at the application.  Would there be a reason this is not caught by normal error trapping?

I'm at a loss and would appreciate any guidance you can provide.

George Weaver

pgsql-novice by date:

Previous
From: sarlav kumar
Date:
Subject: Re: Postgres version change - pg_dump
Next
From: Tom Lane
Date:
Subject: Re: Connection problem with 8 Beta 5