Re: WAL-related tools and .paritial WAL file

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WAL-related tools and .paritial WAL file
Date: 2015-07-02 06:48:37
Message-ID: CAB7nPqT_=SdQMP+T83ox68DwtdWX7Sfdfs0S=qo+tUJS-scOYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 2, 2015 at 2:06 PM, Fujii Masao wrote:
> I implemented the patch accordingly. Patch attached.

Cool, thanks.

I have done some tests with pg_archivecleanup, and it works as
expected, aka if I define a backup file, the backup file as well as
the segments equal or newer than it remain. It works as well when
defining a .partial file. I have done as well some testing with
pg_resetxlog and the partial segment gets removed.

Here are some comments:
1) pgarchivecleanup.sgml needs to be updated:
In this mode, if you specify a <filename>.backup</> file name, then
only the file prefix
Here we should mention that it is also the case of a .partial file.
2)
- * restartWALFileName is a .backup filename, make sure we use the prefix
- * of the filename, otherwise we will remove wrong files since
+ * restartWALFileName is a .partial or .backup filename, make
sure we use
+ * the prefix of the filename, otherwise we will remove wrong
files since
* 000000010000000000000010.00000020.backup is after
* 000000010000000000000010.
Shouldn't this be made clearer as well regarding .partial files? For
example with a comment like that:
otherwise we will remove wrong files since
000000010000000000000010.00000020.backup or
000000010000000000000010.00000020.partial are after
000000010000000000000010. Simply not mentioning those file names
directly is fine for me.
3) Something not caused by this patch that I just noticed... But
pg_resetxlog does not remove .backup files in pg_xlog. Shouldn't they
get moved away as well?
Regards,
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-07-02 06:52:39 Re: Support for N synchronous standby servers - take 2
Previous Message Beena Emerson 2015-07-02 06:43:07 Re: Support for N synchronous standby servers - take 2