Re: ECPG - Specifying connections, TSD, sqlca.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Cc: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ECPG - Specifying connections, TSD, sqlca.
Date: 2004-03-09 19:04:52
Message-ID: 200403091904.i29J4q506032@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Lee Kindness wrote:
> Shridhar, Once the patches I've put forward are applied there's still
> a further change I've got planned which will remove the mutex locking
> in the common case - a NULL/DEFAULT connection parameter (I'll post a
> patch soon). This leaves the threaded case with comparable performance
> to the non-threaded case (both have a function call to get the
> connection, plus a getspecific call in the threaded case). As such is
> there much benefit in adding support for the connection being supplied
> by a struct pointer? You'd also have to add in something like "EXEC
> SQL GET DESCRIPTION xxx" to get the pointer too. How would it improve
> things over how they are in the test_thread_implicit test program?
>
> I still think it's worthwhile investigating the use of GCC's __thread
> storage class specifier to remove the use of pthread_*specific in this
> case. This would also be a help to the WIN32 port since this specifier
> maps well to similar constructs in Microsoft's and Borland's compilers
> (see "thread" item in the TODO at developer.postgresql.org).

I would like to avoid compiler-specific thread stuff unless tests can
show a performance benefit.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-03-09 19:47:34 Re: psqlscan.l
Previous Message Joe Conway 2004-03-09 18:48:33 Re: [OT] Respository [was Re: [PERFORM] Feature request:

Browse pgsql-patches by date

  From Date Subject
Next Message Lee Kindness 2004-03-09 21:15:39 Re: ECPG - Specifying connections, TSD, sqlca.
Previous Message Lee Kindness 2004-03-09 17:30:41 ECPG - Specifying connections, TSD, sqlca.