Re: [HACKERS] Is ECPG's SET CONNECTION really not thread-aware? - Mailing list pgsql-hackers

From Michael Meskes
Subject Re: [HACKERS] Is ECPG's SET CONNECTION really not thread-aware?
Date
Msg-id 2ad9bb57-8ea4-483b-99d4-303d1ce7e29e@postgresql.org
Whole thread Raw
In response to Re: [HACKERS] Is ECPG's SET CONNECTION really not thread-aware?  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Responses Re: [HACKERS] Is ECPG's SET CONNECTION really not thread-aware?  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
Dear Tsunakawa-san,

sorry for the late reply, I've been traveling all of last week and only
just came back.

>> What does this mean by "not thread-aware?"  Does SET CONNECTION in one
>> thread change the current connection in another thread?
>> It doesn't look so, because the connection management and SQL execution
>> in ECPG uses thread-specific data (TSD) to get and set the current connection,
>> like this:

I'm pretty sure it is indeed thread-aware, although I didn't provide the
code for this feature myself.

> So the doc seems to need fix.  The patch is attached.

Thanks, applied.

Michael

-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



pgsql-hackers by date:

Previous
From: Neha Sharma
Date:
Subject: Re: [HACKERS] Proposal : For Auto-Prewarm.
Next
From: Rafia Sabih
Date:
Subject: Re: [HACKERS] Proposal : For Auto-Prewarm.