Re: [bug fix] pg_rewind creates corrupt WAL files, and the standby cannot catch up the primary
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-03-11T14:56:33Z
Lists: pgsql-hackers
On Sun, Mar 11, 2018 at 11:04:01PM +0900, Michael Paquier wrote: > On Fri, Mar 09, 2018 at 08:22:49AM +0000, Tsunakawa, Takayuki wrote: > > Thanks for reviewing. All done. > > Thanks. Please be careful with the indentation of the patch. Attached > is a slightly-updated version with a small modification in > remove_target_file to make the code cleaner, a proposal of commit > message and pgindent applied on the code. I am switching that as ready > for committer. > -- > Michael > From 62950c615d87e3e58998f295ce446eb5c80707e4 Mon Sep 17 00:00:00 2001 > From: Michael Paquier <michael@paquier.xyz> > Date: Sun, 11 Mar 2018 22:49:55 +0900 > Subject: [PATCH] Fix handling of removed files on target server with pg_rewind > > After processing the filemap to build the list of chunks that will be > fetched from the source to rewing the target server, it is possible that > a file which was previously processed is removed from the source. A > simple example of such an occurence is a WAL segment which gets recycled > on the target in-between. When the filemap is processed, files not > categorized as relation files are first truncated to prepare for its > full copy of which is going to be taken from the source, divided into a > set of junks. Hopefully a set of CHUNKS not JUNKS ? Justin
Commits
-
Fix handling of files that source server removes during pg_rewind is running.
- b33e38cb1e14 9.5.13 landed
- 52c32d8d8d3c 9.6.9 landed
- f1e07d576318 10.4 landed
- 09e96b3f3562 11.0 landed