Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
Date
Msg-id 20200119210837.GA1485@alvherre.pgsql
Whole thread Raw
In response to Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line  (Michael Paquier <michael@paquier.xyz>)
Responses Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2020-Jan-19, Michael Paquier wrote:

> So using WAL to tell about a WAL segment file is wrong, WALs is not a
> term that actually exists.

I agree.

> So, in my opinion, it is fine to use "WAL file", "WAL segment" or even
> "WAL segment file".

Agreed with these three terms -- "WAL file" seems to be the most common,
but the other two terms you suggest are just as good.

> +use File::Glob ':bsd_glob';
> +use File::Path qw(remove_tree make_path);
> +use File::Spec::Functions qw(catdir catfile);
> Is this compatible with our minimum perl requirements for the TAP
> tests?

By and large, we just join elements with a slash "foo/bar" to create
path names; no need for catdir or catfile, ISTM.

I *think* :bsd_glob should be available in all the Perl versions we
support, but I'm not sure that we really need it.  We seem to do just
fine with regular glob elsewhere.

PostgresNode already uses File::Path's rmtree.  Looking at its manual,
maybe the safest bet is to change all that to remove_tree.

Not sure about make_path.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: [PATCH] Windows port, fix some resources leaks
Next
From: Tom Lane
Date:
Subject: Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line