ecpg thread-safe descriptor

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Michael Meskes <meskes(at)postgresql(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: ecpg thread-safe descriptor
Date: 2007-10-02 05:38:09
Message-ID: 20071002142425.F4FE.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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 Content-Type Size
ecpg-descriptor-fix-8.3.patch application/octet-stream 13.4 KB
descriptor.pgc application/octet-stream 1.0 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Brendan Jurd 2007-10-02 08:35:21 Re: [HACKERS] Function structure in formatting.c
Previous Message Hiroshi Saito 2007-10-02 05:20:16 Loose check was corrected of win32.mak.