Re: [bug fix] psql \copy doesn't end if backend is killed
От | Tom Lane |
---|---|
Тема | Re: [bug fix] psql \copy doesn't end if backend is killed |
Дата | |
Msg-id | 32508.1392339331@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | [bug fix] psql \copy doesn't end if backend is killed ("MauMau" <maumau307@gmail.com>) |
Ответы |
Re: [bug fix] psql \copy doesn't end if backend is killed
|
Список | pgsql-hackers |
"MauMau" <maumau307@gmail.com> writes: > If the backend is terminated with SIGKILL while psql is running "\copy > table_name from file_name", the \copy didn't end forever. I expected \copy > to be cancelled because the corresponding server process vanished. I just noticed this CF entry pertaining to the same problem that Stephen Frost reported a couple days ago: http://www.postgresql.org/message-id/20140211205336.GU2921@tamriel.snowman.net I believe it's been adequately fixed as of commits fa4440f516 and b8f00a46bc, but if you'd test that those handle your problem cases, I'd appreciate it. > [Fix] > If the message transmission fails in PQputCopyEnd(), switch > conn->asyncStatus back to PGASYNC_BUSY. This patch seems inappropriate to me, because it will allow libpq to exit the COPY IN state whether or not it still has a live connection. If it does, the backend will be in an inconsistent state and we'll have a mess. regards, tom lane
В списке pgsql-hackers по дате отправления: