| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Rob Emery <postgresql(at)mintsoft(dot)net> |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Re: BUG #16032: pg_basebackup when running on Windows doesn't clean up on failure correctly |
| Date: | 2019-10-07 01:21:32 |
| Message-ID: | 20191007012132.GE14532@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fahar Abbas | 2019-10-07 04:27:16 | Re: BUG #16041: Error shows up both in pgAdmin and in Ruby (pg gem) - Segmentation fault |
| Previous Message | Rob Emery | 2019-10-06 19:15:10 | [PATCH] Re: BUG #16032: pg_basebackup when running on Windows doesn't clean up on failure correctly |