Martijn van Oosterhout <> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to