Re: pg_rewind : feature to rewind promoted standby is broken!

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Mithun Cy <mithun(dot)cy(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org, michael(dot)paquier(at)gmail(dot)com, fujii(at)postgresql(dot)org, kuntalghosh(dot)2007(at)gmail(dot)com, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: pg_rewind : feature to rewind promoted standby is broken!
Date: 2019-03-13 08:08:15
Message-ID: 20190313080815.GD2988@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

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

Attachment Content-Type Size
rewind-filter-fix-v2.patch text/x-diff 3.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2019-03-13 09:28:11 Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs
Previous Message PG Bug reporting form 2019-03-13 07:23:03 BUG #15691: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2019-03-13 08:15:35 Re: WIP: BRIN multi-range indexes
Previous Message Nagaura, Ryohei 2019-03-13 07:46:41 RE: Timeout parameters