Re: ThisTimeLineID can be used uninitialized

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ThisTimeLineID can be used uninitialized
Дата
Msg-id 202110211355.svqydm2k4iuq@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: ThisTimeLineID can be used uninitialized  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 2021-Oct-21, Michael Paquier wrote:

> There is already an assumption in walsender.c where an invalid
> timeline is 0, by the way?  See sendTimeLineNextTLI and sendTimeLine.
> Asserting here and there looks like a good thing to do for code paths
> where the timeline should, or should not, be set.

Sure, but as Robert suggested, let's make that value a known and obvious
constant InvalidTimeLineId rather than magic value 0.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"In fact, the basic problem with Perl 5's subroutines is that they're not
crufty enough, so the cruft leaks out into user-defined code instead, by
the Conservation of Cruft Principle."  (Larry Wall, Apocalypse 6)



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

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Added schema level support for publication.
Следующее
От: Fujii Masao
Дата:
Сообщение: wait event and archive_command