Re: Incorrect logic in XLogNeedsFlush()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Incorrect logic in XLogNeedsFlush()
Дата
Msg-id aMzp0ibbduCr3jTW@paquier.xyz
обсуждение исходный текст
Ответ на Re: Incorrect logic in XLogNeedsFlush()  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: Incorrect logic in XLogNeedsFlush()
Re: Incorrect logic in XLogNeedsFlush()
Список pgsql-hackers
On Thu, Sep 18, 2025 at 05:07:00PM +0530, Dilip Kumar wrote:
> I think this comment is a side note which is stating that it is
> possible that while XLogNeedFlush() is deciding that based on the
> current flush position or min recovery point parallely someone might
> flush beyond that point.  And it was existing comment which has been
> improved by adding min recovery points, so I think it makes sense.

Indeed.  I have kept this one after drinking more caffeine, rewording
it slightly.

> I tried improving this comment as well. Feel free to disregard it if
> you think it's not improving it.

The new additions in XLogNeedsFlush() felt overweight, though, so I
have kept a shorter and reworded version.  Then, applied the result.

Do we want to make the order of the checks to be more consistent in
both routines?  These would require a separate set of double-checks
and review, but while we're looking at this area of the code we may as
tweak it more..
--
Michael

Вложения

В списке pgsql-hackers по дате отправления: