Re: Incorrect error handling for two-phase state files resulting in data loss

2018-09-07 Thread Michael Paquier
On Fri, Aug 17, 2018 at 07:56:00AM +0900, Michael Paquier wrote: > As this is a data corruption issue, are there any objections if I patch > and back-patch? I also would like to get this stuff in first as I have > other refactoring work which would shave some more code. I looked at this patch aga

Re: Incorrect error handling for two-phase state files resulting in data loss

2018-08-16 Thread Michael Paquier
On Wed, Jul 18, 2018 at 05:18:18PM +0900, Michael Paquier wrote: > On Mon, Jul 09, 2018 at 02:03:09PM +0900, Michael Paquier wrote: >> I think that we really need to harden things, by making >> ReadTwoPhaseFile() fail hard is it finds something unexpected, which is >> in this case anything except t

Re: Incorrect error handling for two-phase state files resulting in data loss

2018-07-18 Thread Michael Paquier
On Mon, Jul 09, 2018 at 02:03:09PM +0900, Michael Paquier wrote: > I think that we really need to harden things, by making > ReadTwoPhaseFile() fail hard is it finds something unexpected, which is > in this case anything except trying to open a file which fails on > ENOENT, and that this stuff shou

Incorrect error handling for two-phase state files resulting in data loss

2018-07-08 Thread Michael Paquier
Hi all, This is a follow-up of the following thread where I have touched the topic of corrupted 2PC files being completely ignored by recovery: https://www.postgresql.org/message-id/20180709012955.GD1467%40paquier.xyz I have posted a patch on this thread, but after more reviews I have noticed that