Re: BUG #14999: pg_rewind corrupts control file global/pg_control

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, TipTop Labs <office(at)tiptop-labs(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14999: pg_rewind corrupts control file global/pg_control
Date: 2018-03-07 10:49:04
Message-ID: CA+q6zcWix34kmuB6PTgizy4-7Eq2Rn4FX3tpwnH5SdgEU7ugPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

> On 7 March 2018 at 02:46, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Tue, Mar 06, 2018 at 09:37:34PM +0100, Dmitry Dolgov wrote:
>> Thank you for waiting. Yes, it also looks good for me, but I'm wondering about
>> one thing - does it make sense to think about other error codes here, not only
>> about `EACCESS`? E.g. if a file was removed during the process (so, it should
>> be `ENOENT`), or something more exotic happened, like there are too many
>> symbolic links were encountered in resolving a pathname (`ELOOP`)?
>
> The presence of the file is ensured in the pre-phase which builds the
> file map (see process_source_file), and actions are taken depending on
> the presence of a file on the source and the target. So a file missing
> on the target after those pre-checks have ensured that it was actually
> existing should be reported with ENOENT. ELOOP would as well be faced
> on the backend before seeing it in pg_rewind, no? In short, it seems to
> me that it is better to keep the code simple.

Ok, I agree. Then yes, this patch can be probably marked as ready.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-03-07 11:29:30 BUG #15100: sequence behavior on failed insert to a partitioned table
Previous Message Michael Paquier 2018-03-07 05:03:45 Re: BUG #14941: Vacuum crashes

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-03-07 11:01:38 Re: Protect syscache from bloating with negative cache entries
Previous Message Alvaro Herrera 2018-03-07 10:43:16 Re: [HACKERS] GSoC 2017: Foreign Key Arrays