Re: [PATCH] Re: BUG #16032: pg_basebackup when running on Windowsdoesn't clean up on failure correctly

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] Re: BUG #16032: pg_basebackup when running on Windowsdoesn't clean up on failure correctly
Дата
Msg-id 20191007012132.GE14532@paquier.xyz
обсуждение исходный текст
Ответ на [PATCH] Re: BUG #16032: pg_basebackup when running on Windows doesn't clean up on failure correctly  (Rob Emery <postgresql@mintsoft.net>)
Ответы Re: [PATCH] Re: BUG #16032: pg_basebackup when running on Windows doesn't clean up on failure correctly  (Rob Emery <postgresql@mintsoft.net>)
Список pgsql-bugs
On Sun, Oct 06, 2019 at 08:15:10PM +0100, Rob Emery wrote:
> Hello,
>
> I've already posted this to pg_hackers, but I'm not sure if it's
> more normal to post proposed fixes against the bug itself; so see
> attached if needed.

Discussing patches on -bugs threads is perfectly fine :)

Regarding your patch, anything living in the middle of processing
(basically calling disconnect_and_exit() in ~11 and exit() for 12~)
would fail into this category.  Wouldn't it make sense here to use
atexit() to ensure that the cleanup always happens?  I am not sure
that it is a good idea to hope that anything processing the base
backup COPY chunks will remember to clean up those handles in the
event of an error.  I am ready to bet that any future code will forget
to add that so we would keep falling into the same trap.
--
Michael

Вложения

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

Предыдущее
От: Rob Emery
Дата:
Сообщение: [PATCH] Re: BUG #16032: pg_basebackup when running on Windows doesn't clean up on failure correctly
Следующее
От: Fahar Abbas
Дата:
Сообщение: Re: BUG #16041: Error shows up both in pgAdmin and in Ruby (pg gem) - Segmentation fault