Re: PGStream synchronization

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: PGStream synchronization
Date: 2009-09-02 19:52:33
Message-ID: 895e58dd0909021252r67901700wc5cbcf74db9916f8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)truviso(dot)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(at)truviso(dot)com
www.truviso.com

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message JUNG, Christian 2009-09-03 10:47:56 Re: PATCH: SET ROLE as connection parameter
Previous Message Ľubomír Varga 2009-09-02 19:01:43 Re: Possible bug in PGInterval class