Thread-safe PREPARE in ecpg

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Thread-safe PREPARE in ecpg
Дата
Msg-id 20070925150815.F3F8.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
обсуждение исходный текст
Ответы Re: Thread-safe PREPARE in ecpg  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-patches
Here is a WIP patch to make prepared statements thread-safe in ecpg.
The variable prep_stmts was global but not protected by any locks.
I divided it into per-connection field so that we can access prepared
statements separately in each thread.

I needed to change the following exported functions, but it will
introduce an incompatibility issue. It might be ok for CVS HEAD,
but I'd like to port the fix to back versions. Do you have any
thoughts on how we can accomplish this better?

From:
  - bool ECPGdeallocate(int, int, const char *name);
  - bool ECPGdeallocate_all(int, int);
  - char *ECPGprepared_statement(const char *name, int);
To:
  - bool ECPGdeallocate(int, int, const char *connection_name, const char *name);
  - bool ECPGdeallocate_all(int, int, const char *connection_name);
  - char *ECPGprepared_statement(const char *connection_name, const char *name, int);
(connection_name argument is added.)

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Вложения

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

Предыдущее
От: "Jaime Casanova"
Дата:
Сообщение: Re: [HACKERS] 'Waiting on lock'
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] 'Waiting on lock'