Re: BUG #17903: There is a bug in the KeepLogSeg()

Поиск
Список
Период
Сортировка
Искать
От
Nathan Bossart
Тема
Re: BUG #17903: There is a bug in the KeepLogSeg()
Дата
Msg-id
20230421214347.GA1441786@nathanxps13
Ответ на
Список
Дерево обсуждения
BUG #17903: There is a bug in the KeepLogSeg() PG Bug reporting form <noreply@postgresql.org>
Re: BUG #17903: There is a bug in the KeepLogSeg() Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Junwang Zhao <zhjwpku@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Nathan Bossart <nathandbossart@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Nathan Bossart <nathandbossart@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Nathan Bossart <nathandbossart@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Nathan Bossart <nathandbossart@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: BUG #17903: There is a bug in the KeepLogSeg() Michael Paquier <michael@paquier.xyz>
Re: BUG #17903: There is a bug in the KeepLogSeg() Junwang Zhao <zhjwpku@gmail.com>
On Fri, Apr 21, 2023 at 10:42:31AM +0900, Kyotaro Horiguchi wrote:
> From what I understand, the XLogSegNo calculations are designed
> without considering the actual value range. Basically, it assumes that
> (XLogSegNo + ) can overflow.  If we take the actual
> value range into account, we can make that change.
> 
> The choice lies on whether we assume the actual value range or not.

Yeah, after staring at this some more, I think your proposed fix is the way
to go.  Alternatively, we could adjust the conditional for the
max_slot_wal_keep_size block to

	if (keep != InvalidXLogRecPtr && keep < recptr)

but AFAICT that yields the exact same behavior.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com


В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: Anderson Antunes
Дата:
FAQ