Re: Consistently use the XLogRecPtrIsInvalid() macro

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Consistently use the XLogRecPtrIsInvalid() macro
Дата
Msg-id aQDAsFbIaj-b7Ag9@paquier.xyz
обсуждение исходный текст
Ответ на Re: Consistently use the XLogRecPtrIsInvalid() macro  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: Consistently use the XLogRecPtrIsInvalid() macro
Список pgsql-hackers
On Tue, Oct 28, 2025 at 01:40:24PM +0200, Heikki Linnakangas wrote:
> It's also a bit cumbersome that we have XLogRecPtrIsInvalid() rather than
> XLogRecPtrIsValid(). That's inconsistent with OidIsValid and
> TransactionIdInValid, and it leads to an awkward double negative 'if
> (!XLogRecPtrIsInvalid(x))' if you want to check that 'x' is valid.
>
> Overall I'm inclined to do nothing. But if anything, perhaps introduce
> XLogRecPtrIsValid(x) and switch to that, or replace XLogRecPtrIsInvalid(x)
> calls with 'x == InvalidXLogRecPtr'

The annoying part with eliminating XLogRecPtrIsInvalid() or replacing
it is that a bunch of external code would be broken, particularly
backup tools.  I'd rather leave the beast alone.
--
Michael

Вложения

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