Re: pg_restore cancel TODO

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: pg_restore cancel TODO
Дата
Msg-id CAMkU=1yssGV_3ZnwpBBeBa3QuW-VwbqEJ064bGZcyhDdnf1WMQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_restore cancel TODO  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_restore cancel TODO  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Mon, Oct 19, 2015 at 8:28 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Jeff Janes wrote:
>> I've added the TODO item:
>>
>> When pg_upgrade -j ... is interrupted (for example, ctrl-C from the
>> keyboard) make it cancel the children processes.
>>
>> The context where this arises is that I want to populate data into a new
>> installation compiled with a patch under review, but immediately get error
>> messages indicating I forgot to install a required extension.  I hit ctrl-C
>> so I can fix the problem, but it keeps running anyway.

> This looks more like a bug to me than a To-do item.

Why doesn't the control-C kill all the child processes automatically?
I'd have expected it to ...


It seems like gdb eats signals that you send a process while it is being debugged, so it is hard to figure out what is going on.  From strace, it looks like the children do receive a signal but either ignore it, or set a flag and then ignore that.

It doesn't continue to load the entire dump file, it exits once they complete the current assignment and ask the parent for more work.

Could just be a matter of adding the local equivalent of CHECK_FOR_INTERRUPTS in the part of the code that spools COPY data to the backends?  I'm not sure what would happen if it were in the index/constraint building phase, I've never let it get that far when it reported errors early on.

(This is linux, sorry for not making that clear)

Cheers,

Jeff

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: SuperUser check in pg_stat_statements
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_restore cancel TODO