Re: [PATCH] Fix Ctrl-C related issues in psql (not for 8.1)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCH] Fix Ctrl-C related issues in psql (not for 8.1)
Date: 2006-06-14 21:12:54
Message-ID: 3733.1150319574@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> On Wed, Jun 14, 2006 at 12:55:10PM -0400, Tom Lane wrote:
>> I'm not totally satisfied with the large-object fix yet; sometimes you
>> have to hit control-C quite a few times before you manage to abort a
>> long-running \lo_import or \lo_export.

> Well, the obvious thing I can think of is that PQcancel also set a flag
> in the PGconn structure which long-running functions (like lo_import)
> in libpq could check.

Interesting thought, but PQcancel doesn't actually have access to the
PGconn in the current scheme of things --- it's got a separate struct
in the name of thread safety. I'm unsure if it'd be safe to let a
PGcancel struct hang onto a link to the PGconn it was made from ...
but I kinda think not. AFAIR one of the fears that led us to invent the
separate PGcancel struct was the idea that one thread might delete the
PGconn at about the same time another one was trying to issue PQcancel.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2006-06-14 21:18:01 Re: COPY view
Previous Message Bruce Momjian 2006-06-14 21:11:51 Re: COPY view