Re: [PATCH] Fix Ctrl-C related issues in psql (not for 8.1)
От | Tom Lane |
---|---|
Тема | Re: [PATCH] Fix Ctrl-C related issues in psql (not for 8.1) |
Дата | |
Msg-id | 3733.1150319574@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [PATCH] Fix Ctrl-C related issues in psql (not for 8.1) (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-patches |
Martijn van Oosterhout <kleptog@svana.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
В списке pgsql-patches по дате отправления: