Re: TAP / recovery-test fs-level backups, psql enhancements etc

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TAP / recovery-test fs-level backups, psql enhancements etc
Date: 2016-03-03 07:11:48
Message-ID: CAMsr+YG6-NUqH3CbexQZ0nkVM+QpGJGV6yhJVAH4Ssdd61c2xA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 March 2016 at 13:23, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:

> On Thu, Mar 3, 2016 at 2:20 PM, Craig Ringer <craig(at)2ndquadrant(dot)com>
> wrote:
> > On the Perl 5.8.8 test env I've set up now, per
> >
> >
> http://www.postgresql.org/message-id/CAMsr+YGR6pU-gUyp-FT98XwXAsc9n6j-awZAqxvW_+P3RTC7cg@mail.gmail.com
> >
> > master currently fails with
> >
> > t/004_timeline_switch....."remove_tree" is not exported by the File::Path
> > module
> >
> > remove_tree is only in File::Path 2.07 but Perl 5.8.8 has 1.08. No
> buildfarm
> > member has complained, so clearly we don't actually test with the stated
> > supported Perl version.
> >
> > The attached patch fixes it to use the legacy File::Path interface
> 'rmtree'
> > so master runs on 588 again.
>
> Crap. Thanks for spotting that, I was careless. You could still use
> qw() and not use File::Path::rmtree, but that's a matter of taste.
>

New patch series.

The first three are simple fixes that should go in without fuss:

001 fixes the above 5.8.8 compat issue.

002 fixes another minor whoopsie, a syntax error in src/test/recovery/t/
003_recovery_targets.pl that never got noticed because exit codes are
ignored.

003 runs perltidy on PostgresNode.pm to bring it back into conformance
after the recovery tests commit.

The rest are feature patches:

004 allows filtering on RecursiveCopy by a predicate function. Needed for
filesystem level backups (007). It could probably be squashed with 007 if
desired.

005 adds the new psql functions psql_expert and psql_check. Then 006
renames psql_expert to psql and fixes up all call sites across the tree to
use the new interface. I found the bug in 002 as part of that process. I
anticipate that 005 and 006 would be squashed into one commit to master,
but I've kept them separate in my tree for easier review.

007 adds PostgresNode support for hot and cold filesystem-level backups
using pg_start_backup and pg_stop_backup, which will be required for some
coming tests and are useful by themselves.

Each patch is pretty simple except for the psql patch, and even that's not
exactly hairy stuff. The potential risks are low as this is code that's not
part of the server and isn't even run on 'make check' by default. I've
tested it all under a real Perl 5.8.8 on CentOS 5.

I don't expect to be doing much more on the framework at this point as I
want to be able to get back to the code I had to enhance the framework in
order to test....

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-TAP-File-Path-remove_tree-is-new-in-2.x-use-1.x-rmtr.patch text/x-patch 1.2 KB
0002-TAP-Fix-syntax-error-in-recovery-tests.patch text/x-patch 1.1 KB
0003-TAP-Perltidy-PostgresNode.pm.patch text/x-patch 6.0 KB
0004-TAP-Add-filtering-to-RecursiveCopy.patch text/x-patch 3.0 KB
0005-TAP-Add-easier-more-flexible-ways-to-invoke-psql.patch text/x-patch 10.5 KB
0006-TAP-Rename-psql_expert-to-psql-and-use-it-in-all-tes.patch text/x-patch 26.5 KB
0007-TAP-Add-support-for-taking-filesystem-level-backups.patch text/x-patch 3.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-03-03 07:19:40 Re: Re: redo failed in physical streaming replication while stopping the master server
Previous Message Michael Paquier 2016-03-03 07:00:29 Re: Proposal: "Causal reads" mode for load balancing reads without stale data