Re: pgsql: Validate page level checksums in base backups

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Validate page level checksums in base backups
Date: 2018-04-06 20:28:05
Message-ID: CABUevEzZ55qgLVtMxW=hXhzjHV3oU-gChpeKtufyf_siL-rBWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Apr 5, 2018 at 2:41 PM, Michael Banck <michael(dot)banck(at)credativ(dot)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(dot)banck(at)credativ(dot)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/>

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2018-04-06 20:28:06 pgsql: Fix typo
Previous Message Alvaro Herrera 2018-04-06 19:52:03 pgsql: Faster partition pruning

Browse pgsql-hackers by date

  From Date Subject
Next Message Bossart, Nathan 2018-04-06 20:29:33 Re: BUG #14941: Vacuum crashes
Previous Message Alvaro Herrera 2018-04-06 20:28:00 Re: [HACKERS] path toward faster partition pruning