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

From Alexander Korotkov
Subject Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
Date
Msg-id CAPpHfdv9WP4uUDwkhmfvZ0b9+-A4-fxMRkyf7+fUX6w04_cHgQ@mail.gmail.com
Whole thread Raw
In response to Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line  (Alexey Kondratov <a.kondratov@postgrespro.ru>)
Responses Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line
List pgsql-hackers
On Sat, Feb 1, 2020 at 2:16 AM Alexey Kondratov
<a.kondratov@postgrespro.ru> wrote:
> New version is attached. Do you have any other comments or objections?

Now patch looks much better.  Thanks to Michael Paquier for review.
I've just revised commit message reflecting we've removed one of the
new options.

But I have following question.

+       # Move all old master WAL files to the archive.
+       RecursiveCopy::copypath(
+           $node_master->data_dir . "/pg_wal",
+           $node_master->archive_dir
+       );
+       chmod(0700, $node_master->archive_dir);
+
+       # Fast way to remove entire directory content
+       rmtree($node_master->data_dir . "/pg_wal");
+       mkdir($node_master->data_dir . "/pg_wal");
+       chmod(0700, $node_master->data_dir . "/pg_wal");

I think usage of chmod() deserves comment.  As I get default
permissions are sufficient for work, but we need to set them to
satisfy 'check PGDATA permissions' test.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: Yet another vectorized engine
Next
From: Laurenz Albe
Date:
Subject: Re: Error on failed COMMIT