On Thu, Apr 5, 2018 at 2:41 PM, Michael Banck <michael.ba...@credativ.de>
wrote:

> Hi,
>
> On Thu, Apr 05, 2018 at 01:02:27PM +0200, Magnus Hagander wrote:
> > On Wed, Apr 4, 2018 at 8:22 PM, Michael Banck <michael.ba...@credativ.de
> >
> > wrote:
> > > Otherwise, I had a quick look and there is no obvious outlier; the
> > > pgdata is 220 MB after the testrun (195 MB of which is WAL, maybe that
> > > could be cut down somehow?) and the base backups are 22-40 MB each, and
> > > there is around 20 of them, so that adds up to more than 750 MB.
> >
> > It certainly seems reasonable to delete the base backups once they're
> made,
> > after each step, rather than keeping them around forever.
>
> I had a look at this and found a copy-pasto in one of the test cases
> while testing, patch attached.
>

Cute. Applied.


I've also attached a second patch (that applies on top of the first)
> that removes the base backups once they are no longer needed, also
> attached (but see below).
>
> > Do we have a precedent somewhere for how we do this, or does our test
> > framework already have a way to do it? How are all the actual data
> > directories etc cleaned up?
>
> They (and the base backups) are getting purged on success of the whole
> testsuite. So to be clear - we are not leaving behind 1 GB of disk space
> on success, but we use 1 GB of disk space during the test.
>
> > Or should it just be a matter of sprinkling some unlink() calls
> throughout
> > the test file?
>
> I used rmtree() from File::Path (which is also used by PostgresNode to
> clean up) to remove them during the run.
>
>
This seems fine to me. Applied as well.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ <http://www.hagander.net/>
 Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

Reply via email to