Re: pg_rewind : feature to rewind promoted standby is broken!
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Mithun Cy <mithun.cy@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, pgsql-hackers@lists.postgresql.org, michael.paquier@gmail.com, fujii@postgresql.org, kuntalghosh.2007@gmail.com, Robert Haas <robertmhaas@gmail.com>
Date: 2019-03-13T08:08:15Z
Lists: pgsql-bugs, pgsql-hackers
Attachments
- rewind-filter-fix-v2.patch (text/x-diff) patch v2
On Tue, Mar 12, 2019 at 06:23:01PM +0900, Michael Paquier wrote: > And you are pointing out to the correct commit. The issue is that > process_target_file() has added a call to check_file_excluded(), and > this skips all the folders which it thinks can be skipped. One > problem though is that we also filter out pg_internal.init, which is > present in each database folder, and remains in the target directory > marked for deletion. Then, when the deletion happens, the failure > happens as the directory is not fully empty. Okay, here is a refined patch with better comments, the addition of a test case (creating tables in the new databases in 002_databases.pl is enough to trigger the problem). Could you check that it fixes the issue on your side? -- Michael
Commits
-
Fix pg_rewind when rewinding new database with tables included
- dcf2a0db8529 11.3 landed
- a7eadaaaaf08 12.0 landed
-
Make pg_rewind skip files and directories that are removed during server start.
- 266b6acb312f 11.0 cited