Search Postgresql Archives

Re: Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Leif Jensen wrote:
> 
> Thank you for your comment. Yes, it would be nice to get some more
> comments on the allocate/deallocate on a connection issue.
> 
> I have verified that in my case deallocating a prepared statement,
> it guesses the wrong connection and returns an error. (The right
> one is doing auto-deallocation at disconnect time, though).
> 
> However, I just noticed that allocating a descriptor with the "AT
>  <connection>" clause,
> EXEC SQL AT :_thisDbConn ALLOCATE DESCRIPTOR :descname;
> generates an ECPGallocate_desc() call without any connection name and
> that this can "screw up" the ECPGget_desc() function when guessing a
> connection. I could of course use:
> EXEC SQL SET CONNECTION <connection name>;
> before the allocate, but that would need mutex's all over to make sure
> that other threads will not set the connection too.
> 
> Any idea why the ecpg pre-compiler doesn't use the named connection
> for the ALLOCATE DESCRIPTOR statement even though it allows it ?

Unfortunately, like you, I am just a user of this wonderful DB.  Since
we are not seeing any other input here on the 'general' list it may be
time to move this thread to the pgsql-interfaces list.  Are you subscribed
to it?  It is a very low bandwidth list but it does tend to highlight the
interface issues distinct from the general DB discussions.

BTW, your PG install is 10 'point' releases behind the current release for
the 8.3.x branch.  While I am at 8.4.7 (one point release behind) I seem to
be seeing a similar set of issues and nothing in the 8.4.8 change-list says
anything about ecpg.

Bosco.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux