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

Поиск
Список
Период
Сортировка
От Bosco Rama
Тема Re: Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs
Дата
Msg-id 4DE5895E.4060004@boscorama.com
обсуждение исходный текст
Ответ на Re: Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs  (Leif Jensen <leif@crysberg.dk>)
Ответы Re: Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: troubles with initdb
Следующее
От: jlhgis
Дата:
Сообщение: Re: troubles with initdb