Skip site navigation (1) Skip section navigation (2)

Re: PGStream synchronization

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: PGStream synchronization
Date: 2009-08-25 00:48:04
Message-ID: 4A9334C4.2060503@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Maciek Sakrejda wrote:
> We've found some synchronization issues around PGStream in
> QueryExecutorImpl and ProtocolConnectionImpl. Specifically, while
> QueryExecutorImpl synchronizes all its uses off PGStream,
> ProtocolConnectionImpl uses the same PGStream directly when close() is
> called. This can easily cause protocol-level errors and,
> theoretically, at least, bad data shoved into a COPY IN query while
> the actual Connection.close() is ignored. This doesn't just affect
> COPY, though--anything that causes writes to the QueryExecutorImpl's
> pgStream could be affected.
> 
> The only thing I've achieved so far is protocol-level errors, but
> that's a serious enough issue on its own.
> 
> It's not immediately clear how to fix this, since we don't want to
> synchronize PGStream itself. Should ProtocolConnectionImpl just
> delegate to QueryExecutorImpl on close() perhaps, with
> QueryExecutorImpl handling the actual writes to PGStream?

What's the expected behaviour when Connection.close() is called
concurrently with other work happening on the connection - should the
close interrupt the current operation?

-O

In response to

Responses

pgsql-jdbc by date

Next:From: Maciek SakrejdaDate: 2009-08-25 15:15:35
Subject: Re: PGStream synchronization
Previous:From: Maciek SakrejdaDate: 2009-08-25 00:36:52
Subject: PGStream synchronization

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group