From: Oliver Jowett <oliver@opencloud.com>
To: Maciek Sakrejda <msakrejda@truviso.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PGStream synchronization
Date: Wed, 26 Aug 2009 10:53:46 +1200
Message-ID: <4A946B7A.60408@opencloud.com> (raw)
In-Reply-To: <895e58dd0908250951m1aa4baabnf1695c9e681aa278@mail.gmail.com>
References: <895e58dd0908241736q3575cdc2v461d879c5b5f9dcb@mail.gmail.com>
<4A9334C4.2060503@opencloud.com>
<895e58dd0908250815m1a8aada0qc9d3f0bde9c7a303@mail.gmail.com>
<895e58dd0908250951m1aa4baabnf1695c9e681aa278@mail.gmail.com>
Maciek Sakrejda wrote:
> I'm not that familiar with the FEBE protocol (I'll look into this as
> well), but we don't need to cancel regular queries explicitly, right?
You can do query cancellation via a separate connection, but that's
really about halting long-running queries while preserving your
connection which is not really what we're after here. All that really
matters is getting the Terminate in at an appropriate point in the
stream so that the backend knows it's a deliberate shutdown and doesn't
complain about an unexpected-client-EOF.
> The Terminate message is always valid, except in COPY mode? If that's
> the case, we only need to ensure that the various PGStream messages
> are sent atomically (which is currently *not* the case in the case of
> Terminate), and handle COPY specially (by issuing CopyFail followed by
> Terminate). I'm happy to start work on a patch if we find an approach
> we agree on.
Right, so long as you get the atomicity correct I think that will work.
This will probably require more finegrained synchronization since
currently there's effectively one big lock that's held for the entire
duration of the query, which doesn't work so well here if you want
close() to interrupt any ongoing operation in a timely fashion.
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, msakrejda@truviso.com
Subject: Re: PGStream synchronization
In-Reply-To: <4A946B7A.60408@opencloud.com>
References: <895e58dd0908241736q3575cdc2v461d879c5b5f9dcb@mail.gmail.com> <4A9334C4.2060503@opencloud.com> <895e58dd0908250815m1a8aada0qc9d3f0bde9c7a303@mail.gmail.com> <895e58dd0908250951m1aa4baabnf1695c9e681aa278@mail.gmail.com> <4A946B7A.60408@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox