From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Liudmila Mantrova <l(dot)mantrova(at)postgrespro(dot)ru>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, vladimirlesk(at)yandex-team(dot)ru, dsarafan(at)yandex-team(dot)ru |
Subject: | Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line |
Date: | 2020-02-25 10:48:10 |
Message-ID: | CAPpHfdv9WP4uUDwkhmfvZ0b9+-A4-fxMRkyf7+fUX6w04_cHgQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Feb 1, 2020 at 2:16 AM Alexey Kondratov
<a(dot)kondratov(at)postgrespro(dot)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 | Content-Type | Size |
---|---|---|
v15-0001-pg_rewind-Add-options-to-restore-WAL-files.patch | application/octet-stream | 25.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2020-02-25 11:11:21 | Re: Error on failed COMMIT |
Previous Message | Konstantin Knizhnik | 2020-02-25 10:44:25 | Re: Yet another vectorized engine |