Re: Why don't update minimum recovery point in xact_redo_abort

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: 蔡梦娟(玊于) <mengjuan(dot)cmj(at)alibaba-inc(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Why don't update minimum recovery point in xact_redo_abort
Date: 2021-07-27 16:49:35
Message-ID: ab02ed2a-404a-314e-0b3e-d85b1c222c68@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/07/27 19:51, Michael Paquier wrote:
> On Tue, Jul 27, 2021 at 05:26:05PM +0900, Fujii Masao wrote:
>> ISTM that you're right. xact_redo_abort() should call XLogFlush() to
>> update the minimum recovery point on truncation. This seems
>> the oversight in commit 7bffc9b7bf.
>
> Indeed. It would be nice to see some refactoring of this code as
> well? Both share a lot of steps, so adding something to one path can
> easily lead to the other path being forgotten.

That's idea, but as far as I read both functions, they seem not
so similar. So I'm not sure how much such refactoring would help.

Anyway I attached the patch that changes only xact_redo_abort()
so that it calls XLogFlush() to update min recovery point.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment Content-Type Size
xact_redo_abort.patch text/plain 649 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-07-27 16:52:33 Re: Removing "long int"-related limit on hash table sizes
Previous Message Fujii Masao 2021-07-27 16:32:16 Re: Inaccurate error message when set fdw batch_size to 0