ECPG - Specifying connections, TSD, sqlca. - Mailing list pgsql-hackers

From Lee Kindness
Subject ECPG - Specifying connections, TSD, sqlca.
Date
Msg-id 16461.65345.751057.761165@kelvin.csl.co.uk
Whole thread Raw
Responses Re: ECPG - Specifying connections, TSD, sqlca.  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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).

And I still can't see how you'll bind sqlca to the connection object,
but best of luck!

Regards, Lee K.


pgsql-hackers by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: raising the default default_statistics_target
Next
From: Bruce Momjian
Date:
Subject: Re: [OT] Respository [was Re: [PERFORM] Feature request: smarter