Re: proposal: psql \setfileref

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: proposal: psql \setfileref
Дата
Msg-id 401c6510-9a4c-439b-96c6-43c60a330b30@mm
обсуждение исходный текст
Ответ на Re: proposal: psql \setfileref  (Gilles Darold <gilles.darold@dalibo.com>)
Ответы Re: proposal: psql \setfileref  (Gilles Darold <gilles.darold@dalibo.com>)
Список pgsql-hackers
Gilles Darold wrote:

>    postgres=# \setfileref b /dev/random
>    postgres=# insert into test (:b);
>
> Process need to be killed using SIGTERM.

This can be fixed by setting sigint_interrupt_enabled to true
before operating on the file. Then ctrl-C would be able to cancel
the command.

See comment in common.c, above the declaration of
sigint_interrupt_enabled:

/*[....]* SIGINT is supposed to abort all long-running psql operations, not only* database queries.  In most places,
thisis accomplished by checking* cancel_pressed during long-running loops.  However, that won't work when* blocked on
userinput (in readline() or fgets()).  In those places, we* set sigint_interrupt_enabled TRUE while blocked,
instructingthe signal* catcher to longjmp through sigint_interrupt_jmp.  We assume readline and* fgets are coded to
handlepossible interruption.  (XXX currently this does* not work on win32, so control-C is less useful there)*/ 


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Using pg_ctl promote -w in TAP tests
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: pg_upgrade 9.5 -> 9.6 fails when pg_largeobject is in separate tablespace