X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C0F259DCC39 for ; Wed, 21 Dec 2005 10:41:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31399-03 for ; Wed, 21 Dec 2005 10:41:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by postgresql.org (Postfix) with ESMTP id 7AC669DCC1B for ; Wed, 21 Dec 2005 10:41:07 -0400 (AST) Received: from mailgate.vale-housing.co.uk ([194.217.48.34] helo=vale-housing.co.uk) by anchor-post-34.mail.demon.net with esmtp (Exim 4.42) id 1Ep59T-000ESw-Ez for pgsql-odbc@postgresql.org; Wed, 21 Dec 2005 14:41:11 +0000 Received: from 192.168.1.176 ([192.168.1.176]) by ratbert.vale-housing.co.uk ([192.168.1.106]) with Microsoft Exchange Server HTTP-DAV ; Wed, 21 Dec 2005 14:41:12 +0000 User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Wed, 21 Dec 2005 14:41:10 +0000 Subject: Re: psqlODBC with Visual Studio 2005 and Connection From: Dave Page To: Ludek Finstrle , Patrick Donelan CC: Message-ID: Thread-Topic: [ODBC] psqlODBC with Visual Studio 2005 and Connection Pooling for newbies Thread-Index: AcYGPJVX08CZxXIvEdqmIQARJHpWaA== In-Reply-To: <20051221132454.GD30837@soptik.pzkagis.cz> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.344 required=5 tests=[AWL=0.344] X-Spam-Score: 0.344 X-Spam-Level: X-Archive-Number: 200512/294 X-Sequence-Number: 6773 On 21/12/05 1:24 pm, "Ludek Finstrle" wrote: >> Anyway, as far as I can tell the driver is installed by default with >> Connection Pooling off which means that most newbies like me are going >> to hit the performance problem and think that something is wrong with >> psqlODBC. I thought it might be worth putting a note in the README >> alerting people to this. > > I think we can change the default behaviour. > >> At this stage I'm thinking of having my app forcibly turn Connection >> Pooling on by setting the Windows Registry key: >> HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode >> CPTimeout = 60 > > Dave, it's good idea to add this to .reg file or install procedure, > isn't it? Please could you add it before releasing 08.01.0200? I don't think so, because it is only safe to use if you know that the application isn't going to execute any SET's or otherwise change the connection environment before returning the connection to the pool. The DM pools connections based entirely on the connection string, and uid/pwd, and connection-specific server settings. To be safe, when the app calls SQLDisconnect it seems to me that all temporary tables must be dropped, and a RESET ALL executed. I'm not sure how to achieve this though given that the DM presumably intercepts the SQLDisconnect call when pooling. If it doesn't intercept the call (which seems unlikely), then CC_cleanup will do a pretty good job of making the connection unusable anyway. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od bcodbc_connection_pooling.asp Regards, Dave