Re: [PATCH]make pg_rewind to not copy useless WAL files

From: chenhj <chjischj(at)163(dot)com>
To: "Alexander Korotkov" <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH]make pg_rewind to not copy useless WAL files
Date: 2017-10-01 17:27:31
Message-ID: 131be7f7.121.15ed8fa8a02.Coremail.chjischj@163.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On 2017-10-01 04:09:19,"Alexander Korotkov" <a(dot)korotkov(at)postgrespro(dot)ru> wrote:

On Sat, Sep 30, 2017 at 8:18 PM, chenhj <chjischj(at)163(dot)com> wrote:

On 2017-09-30 02:17:54,"Alexander Korotkov" <a(dot)korotkov(at)postgrespro(dot)ru> wrote:

Great. Now code of this patch looks good for me.
However, we forgot about documentation.

<para>
The result is equivalent to replacing the target data directory with the
source one. Only changed blocks from relation files are copied;
all other files are copied in full, including configuration files. The
advantage of <application>pg_rewind</> over taking a new base backup, or
tools like <application>rsync</>, is that <application>pg_rewind</> does
not require reading through unchanged blocks in the cluster. This makes
it a lot faster when the database is large and only a small
fraction of blocks differ between the clusters.
</para>

At least, this paragraph need to be adjusted, because it states whose files are copied. And probably latter paragraphs whose state about WAL files.

Your are rigth.
I wrote a draft as following, but i'm afraid whether the english statement is accurate.

I'm not native english speaker too :(

Only the WAL files between the point of divergence and the current WAL insert location of the source server are copied, *for* other WAL files are useless for the target server.

I'm not sure about this usage of word *for*. For me, it probably should be just removed. Rest of changes looks good for me. Please, integrate them into the patch.

I had removed the *for* , Pleae check the new patch again.

---
Best Regards,
Chen Huajun

Attachment Content-Type Size
pg_rewind_wal_copy_reduce_v8.patch application/octet-stream 11.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2017-10-01 18:16:02 Re: SQL/JSON in PostgreSQL
Previous Message Fabien COELHO 2017-10-01 16:13:02 Re: show precise repos version for dev builds?