pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Rob Emery <postgresql@mintsoft.net>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: [PATCH] Re: BUG #16032: pg_basebackup when running on Windows doesn't  clean up on failure correctly
Date: Mon, 7 Oct 2019 10:21:32 +0900
Message-ID: <20191007012132.GE14532@paquier.xyz> (raw)
In-Reply-To: <0c6477f627e63c9cea68a6eda3f29a74@mintsoft.net>
References: <16032-4ba56823a2b2805f@postgresql.org>
	<0c6477f627e63c9cea68a6eda3f29a74@mintsoft.net>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (4+ messages)  latest in thread

Message-ID: <20191007012132.GE14532@paquier.xyz>
Permalink:  ../20191007012132.GE14532@paquier.xyz/
Also on:    postgresql.org/message-id/20191007012132.GE14532@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, postgresql@mintsoft.net
  Subject: Re: [PATCH] Re: BUG #16032: pg_basebackup when running on Windows doesn't  clean up on failure correctly
  In-Reply-To: <20191007012132.GE14532@paquier.xyz>
  References: <16032-4ba56823a2b2805f@postgresql.org> <0c6477f627e63c9cea68a6eda3f29a74@mintsoft.net> <20191007012132.GE14532@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox