Re: PGStream synchronization - Mailing list pgsql-jdbc

From Maciek Sakrejda
Subject Re: PGStream synchronization
Date
Msg-id 895e58dd0909021252r67901700wc5cbcf74db9916f8@mail.gmail.com
Whole thread Raw
In response to Re: PGStream synchronization  (Maciek Sakrejda <msakrejda@truviso.com>)
List pgsql-jdbc
So, for what it's worth, the hybrid approach somehow turned out to be
a massive, massive performance regression in our tests. We're still
looking into why. The only thing I've found that works consistently so
far is to *always* just close the pgStream socket (without sending
anything), which is only marginally better in theory than the current
situation (and probably actually worse in practice, since you're
unlikely to see concurrent use of the same connection, whereas having
a clean protocol shutdown is nice). I'll let the list know if we find
a better approach.

On Thu, Aug 27, 2009 at 10:50 PM, Maciek Sakrejda<msakrejda@truviso.com> wrote:
>> How about, instead of using raw monitor synchronization to provide
>> mutual exclusion on access to the stream, we use a lock object (i.e.
>> something similar to java.util.concurrent.locks.Lock, though we can't
>> use exactly that class before 1.5 obviously), try to grab the lock
>> before close, and behave differently depending on if we succeeded or not.

--
Maciek Sakrejda | Software Engineer | Truviso
(650) 242-3500 Main
(650) 242-3501 F
msakrejda@truviso.com
www.truviso.com

pgsql-jdbc by date:

Previous
From: Ľubomír Varga
Date:
Subject: Re: Possible bug in PGInterval class
Next
From: "JUNG, Christian"
Date:
Subject: Re: PATCH: SET ROLE as connection parameter