On Sat, Feb 1, 2020 at 2:16 AM Alexey Kondratov
<a.kondra...@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: v15-0001-pg_rewind-Add-options-to-restore-WAL-files.patch
Description: Binary data

Reply via email to