pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Maciek Sakrejda <msakrejda@truviso.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PGStream synchronization
Date: Thu, 27 Aug 2009 12:07:39 +1200
Message-ID: <4A95CE4B.5050107@opencloud.com> (raw)
In-Reply-To: <895e58dd0908260201g59762012ka2349eada052ab6d@mail.gmail.com>
References: <895e58dd0908241736q3575cdc2v461d879c5b5f9dcb@mail.gmail.com>
	<4A9334C4.2060503@opencloud.com>
	<895e58dd0908250815m1a8aada0qc9d3f0bde9c7a303@mail.gmail.com>
	<895e58dd0908250951m1aa4baabnf1695c9e681aa278@mail.gmail.com>
	<4A946B7A.60408@opencloud.com>
	<895e58dd0908260201g59762012ka2349eada052ab6d@mail.gmail.com>

Maciek Sakrejda wrote:

> I'm not really sure if there's another clean approach, though. I'm
> attaching a patch that takes another dirty approach, but other than
> the fact that it seems to work, I don't really like it at all. The
> basic idea is to cancel whatever you're doing before closing the
> connection: if there's an active copy, have the executor send a
> CopyFail; otherwise, have the ProtocolConnectionImpl request a query
> cancellation.

This seems a bit heavyweight because cancelling a query isn't a trivial
amount of work, and it'll happen whenever close() is called if I read
your patch correctly. 99% of apps are effectively single-threaded so it
seems expensive to always do this when it's rarely needed ..

-O



view thread (12+ messages)  latest in thread

Message-ID: <4A95CE4B.5050107@opencloud.com>
Permalink:  ../4A95CE4B.5050107@opencloud.com/
Also on:    postgresql.org/message-id/4A95CE4B.5050107@opencloud.com

 · 

reply

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: <4A95CE4B.5050107@opencloud.com>
  References: <895e58dd0908241736q3575cdc2v461d879c5b5f9dcb@mail.gmail.com> <4A9334C4.2060503@opencloud.com> <895e58dd0908250815m1a8aada0qc9d3f0bde9c7a303@mail.gmail.com> <895e58dd0908250951m1aa4baabnf1695c9e681aa278@mail.gmail.com> <4A946B7A.60408@opencloud.com> <895e58dd0908260201g59762012ka2349eada052ab6d@mail.gmail.com> <4A95CE4B.5050107@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