From: davecramer (@davecramer) <noreply+davecramer@github.com>
To: postgresql-interfaces/psqlodbc <noreply+postgresql-interfaces-psqlodbc@github.com>
Subject: Re: [postgresql-interfaces/psqlodbc] issue #224: psqlODBC driver or MS System.Data.Odbc do not report connection lost
Date: Tue, 27 Oct 2026 14:56:13 +0000
Message-ID: <gh-postgresql-interfaces-psqlodbc-224-c6445289222@github.com> (raw)
In-Reply-To: <gh-postgresql-interfaces-psqlodbc-224@github.com>
References: <gh-postgresql-interfaces-psqlodbc-224@github.com>
Timing: probably yes. The connection is accepted and then dropped by the server, which points at server-side activity right after startup. The PostgreSQL server log at that moment is the evidence to look for: FATAL / terminating connection lines, or a postmaster restart.
Why State stays Open: according to the code it shouldn't. We need logs to see what SQL_ATTR_CONNECTION_DEAD actually returned.
Can you get me logs: psqlODBC MyLog and CommLog for a scenario 2 run.
The CONNECTION_DEAD status=%d log line shows exactly what the driver told .NET.
Possibly the server log for the same moment.
Can you tell me: whether Windows ODBC connection pooling is enabled for the driver, their .NET version, and the connection string (especially ConnSettings).
Whether the app shares one OdbcConnection across threads.