pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Michael Paquier <michael@paquier.xyz>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: TipTop Labs <office@tiptop-labs.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14999: pg_rewind corrupts control file global/pg_control
Date: Wed, 7 Mar 2018 10:46:24 +0900
Message-ID: <20180307014624.GC1744@paquier.xyz> (raw )
In-Reply-To: <CA+q6zcVCfeYoAmPyW5R+uxZ0MD6=ZunsW=uP0AS=B=RxB8M7Tg@mail.gmail.com >
References: <0D104D1E-6103-49F4-8AB8-B5CD92949E18@tiptop-labs.com >
<20180115072537.GC1724@paquier.xyz >
<D2684F73-AE17-453B-ACB5-9CF0A7F6856E@tiptop-labs.com >
<20180227012441.GB3255@paquier.xyz >
<CA+q6zcWeFmGc=uC5CwL7HznL25nCqh0CvepgtyuGQo1duStE+w@mail.gmail.com >
<20180305075431.GH2266@paquier.xyz >
<CAD21AoDiHUUguQ7UUyK_Z4icHM3OiP8OEkpgDCsT3fg3B-P2LA@mail.gmail.com >
<20180305090111.GI2266@paquier.xyz >
<CAD21AoC3zSRrCdn6SBh4-whtXT0hCKCwjZM16uH1s1CU3DY+iQ@mail.gmail.com >
<CA+q6zcVCfeYoAmPyW5R+uxZ0MD6=ZunsW=uP0AS=B=RxB8M7Tg@mail.gmail.com >
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.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
view thread (29+ messages) latest in thread
Message-ID: <20180307014624.GC1744@paquier.xyz>
Permalink: ../20180307014624.GC1744@paquier.xyz/
Also on: postgresql.org/message-id/20180307014624.GC1744@paquier.xyz
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, 9erthalion6@gmail.com, sawada.mshk@gmail.com, office@tiptop-labs.com, michael.paquier@gmail.com
Subject: Re: BUG #14999: pg_rewind corrupts control file global/pg_control
In-Reply-To: <20180307014624.GC1744@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox