From: | chenhj <chjischj(at)163(dot)com> |
---|---|
To: | "Michael Paquier" <michael(dot)paquier(at)gmail(dot)com> |
Cc: | "Alexander Korotkov" <a(dot)korotkov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH]make pg_rewind to not copy useless WAL files |
Date: | 2017-09-18 17:00:38 |
Message-ID: | 76e330e3.2.15e95ef4236.Coremail.chjischj@163.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 2017-09-17 08:33:33, "Michael Paquier" <michael(dot)paquier(at)gmail(dot)com> wrote:
>On Sun, Sep 17, 2017 at 3:19 AM, Alexander Korotkov
><a(dot)korotkov(at)postgrespro(dot)ru> wrote:
>> Hi!
>>
>> On Sat, Sep 16, 2017 at 5:56 PM, chenhj <chjischj(at)163(dot)com> wrote:
>>>
>>> This patch optimizes the above mentioned issues, as follows:
>>> 1. In the target data directory, do not delete the WAL files before the
>>> divergence.
>>> 2. When copying files from the source server, do not copy the WAL files
>>> before the divergence and the WAL files after the current WAL insert
>>> localtion.
>>
>>
>> Looks like cool optimization for me. Please, add this patch to the next
>> commitfest.
>
>Agreed.
>
>> Do you think this patch should modify pg_rewind tap tests too? It would be
>> nice to make WAL files fetching more covered by tap tests. In particular,
>> new tests may generate more WAL files and make sure that pg_rewind fetches
>> only required files among them.
>
>This looks mandatory to me. Using pg_switch_wal() and a minimum amount
>of WAL generated you could just make the set of WAL segments skipped
>minimal data.
>
>I have not checked in details, but I think that the positions where
>you are applying the filters are using the right approach.
>
>! !(strncmp(path, "pg_wal", 6) == 0 && IsXLogFileName(path + 7) &&
>Please use XLOGDIR here.
>--
>Michael
>
Thanks, I will use XLOGDIR and add TAP tests later.
--
Chen Huajun
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2017-09-18 17:04:34 | Re: GnuTLS support |
Previous Message | Andrew Dunstan | 2017-09-18 16:56:22 | Re: [PATCH] Add citext_pattern_ops to citext contrib module |