COPY and "pg_ctl -m fast stop"

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема COPY and "pg_ctl -m fast stop"
Дата
Msg-id 1236808964.630.17.camel@dell.linuxdev.us.dell.com
обсуждение исходный текст
Список pgsql-general
If I open up a session and do:

copy t from stdin;

And then I let the psql session just sit there, not producing data, then
I do a "pg_ctl -m fast stop", then that backend doing the copy doesn't
terminate.

Is this expected behavior? I looked at the code, and it looks like it
ignores an interruption while waiting for data from the client, and
immediately tries to receive data from the socket again.

It seems like there should be some way for "-m fast" to gracefully close
the active connections. Right now, "-m immediate" is required, which
causes nasty log messages and recovery on restart.

Perhaps it could ignore SIGINT while waiting for data from the client,
but respond to SIGTERM?

Regards,
    Jeff Davis


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

Предыдущее
От: Joshua Tolley
Дата:
Сообщение: Re: Sync 2 tables in 2 databases
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: I don't want to back up index files