From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, amul sul <sulamul(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ThisTimeLineID can be used uninitialized |
Date: | 2021-10-21 13:55:26 |
Message-ID: | 202110211355.svqydm2k4iuq@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2021-10-21 13:57:50 | wait event and archive_command |
Previous Message | vignesh C | 2021-10-21 13:19:24 | Re: Added schema level support for publication. |