Here is a patch to fix thread-safety of SQL DESCRIPTOR in ecpg.

The global variable 'all_descriptors' is split into per-thread vars.
There was another idea of splitting into per-connection vars, but
I did not do that because there are allocating descriptors before
connection and deallocating after disconnection in the regression test.

The attached descriptor.pgc is a test case for the issue.
It is not included into regression test of ecpg.

If this change is acceptable to be applied to HEAD, I'll start backporting
recent fixes (prepared statement, memory allocation and descriptor) to 8.2
(and older versions if possible).

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

Attachment: ecpg-descriptor-fix-8.3.patch
Description: Binary data

Attachment: descriptor.pgc
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to