Re: ThisTimeLineID can be used uninitialized - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: ThisTimeLineID can be used uninitialized
Date
Msg-id 202110211355.svqydm2k4iuq@alvherre.pgsql
Whole thread Raw
In response to Re: ThisTimeLineID can be used uninitialized  (Michael Paquier <michael@paquier.xyz>)
List 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 by date:

Previous
From: vignesh C
Date:
Subject: Re: Added schema level support for publication.
Next
From: Fujii Masao
Date:
Subject: wait event and archive_command