Re: psqlODBC with Visual Studio 2005 and Connection

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: Ludek Finstrle <luf(at)pzkagis(dot)cz>, Patrick Donelan <pdonelan(at)optusnet(dot)com(dot)au>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: psqlODBC with Visual Studio 2005 and Connection
Date: 2005-12-21 14:41:10
Message-ID: BFCF1A06.8209%dpage@vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 21/12/05 1:24 pm, "Ludek Finstrle" <luf(at)pzkagis(dot)cz> 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

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Lane 2005-12-21 15:25:11 Re: Next development steps?
Previous Message noreply 2005-12-21 14:19:57 [ psqlodbc-Bugs-1000498 ] rollback to savepoint in case of error