public inbox for [email protected]  
help / color / mirror / Atom feed
PostgreSQL, and ODBC statement handles
2+ messages / 2 participants
[nested] [flat]

* PostgreSQL, and ODBC statement handles
@ 2017-05-03 23:41 Reza Taheri <[email protected]>
  2017-05-04 04:12 ` Re: PostgreSQL, and ODBC statement handles Tom Lane <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Reza Taheri @ 2017-05-03 23:41 UTC (permalink / raw)
  To: pgsql-interfaces

I am running a benchmark (TPCx-V) with a single process on the client system handing all the load. Each connection to the server is in a separate thread with its own connection to PGSQL, and its own connection handle and statement handle.  I am facing a contention problem with ODBC on the client side. strace and perf top show we are serializing over what appears to be accesses to the ODBC statement handle. Contention goes away if I use multiple processes instead of multiple threads within a process.

I suppose I don't understand the concept of "handles" well, but I am surprised that all the threads get the same connection handle number and the same statement handle number. Does that mean some data structure is shared between the different threads? Is there a way to force different statement handles (or handle numbers???) for different threads within one process? I have asked this question on the ODBC mailing list, and they suggested it could be something in the postgresql driver. I can provide detailed performance data, but maybe someone can help me figure out what might be a very basic configuration or parameter setting problem. I am running the following RPMs on RHEL 7.1:
postgresql93-9.3.5-2PGDG.rhel7.x86_64
postgresql93-odbc-09.03.0300-1PGDG.rhel7.x86_64
unixODBC-2.3.1-10.el7.x86_64

Thanks,
Reza


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PostgreSQL, and ODBC statement handles
  2017-05-03 23:41 PostgreSQL, and ODBC statement handles Reza Taheri <[email protected]>
@ 2017-05-04 04:12 ` Tom Lane <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2017-05-04 04:12 UTC (permalink / raw)
  To: Reza Taheri <[email protected]>; +Cc: pgsql-interfaces

Reza Taheri <[email protected]> writes:
> I am running a benchmark (TPCx-V) with a single process on the client
> system handing all the load. Each connection to the server is in a
> separate thread with its own connection to PGSQL, and its own connection
> handle and statement handle.  I am facing a contention problem with ODBC
> on the client side. strace and perf top show we are serializing over
> what appears to be accesses to the ODBC statement handle. Contention
> goes away if I use multiple processes instead of multiple threads within
> a process.

No idea about the answer to this, but I suggest that you might find
help on the pgsql-odbc list, if no one answers here.

			regards, tom lane


-- 
Sent via pgsql-interfaces mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-05-04 04:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 23:41 PostgreSQL, and ODBC statement handles Reza Taheri <[email protected]>
2017-05-04 04:12 ` Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox