Re: pg_rewind failure by file deletion in source server - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_rewind failure by file deletion in source server
Date
Msg-id CAB7nPqRrvgZUX4=mv96RABnBcs+tDd5QBT8QNxsmvGUGjw8yVQ@mail.gmail.com
Whole thread Raw
In response to pg_rewind failure by file deletion in source server  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: pg_rewind failure by file deletion in source server  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Thu, Jun 11, 2015 at 1:51 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> Shouldn't pg_rewind ignore that failure of operation? If the file is not
> found in source server, the file doesn't need to be copied to destination
> server obviously. So ISTM that pg_rewind safely can skip copying that file.
> Thought?

I think that you should fail. Let's imagine that the master to be
rewound has removed a relation file before being stopped cleanly after
its standby has been promoted that was here at the last checkpoint
before forking, and that the standby still has the relation file after
promotion. You should be able to copy it to be able to replay WAL on
it. If the standby has removed a file in the file map after taking the
file map, I guess that the best thing to do is fail because the file
that should be here for the rewound node cannot be fetched.
Documentation should be made clearer about that with a better error
message...
-- 
Michael



pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Typo in comment in setrefs.c
Next
From: David Rowley
Date:
Subject: Re: 9.5 release notes