Skip to content

Commit da083b2

Browse files
committed
Initialize variable to placate compiler.
I don't think there's a real problem here, because if we reach the loop over 'tles' then we will either find at least one TimeLineHistoryEntry such that oldest_segno != 0, in which case unsummarized_lsn will be initialized, or else unsummarized_tli will remain 0 and an error will occur before unsummarized_lsn is used for anything. But some compilers are complainining, as reported on list by Nathan Bossart and off-list by Andrew Dunstan. Discussion: http://postgr.es/m/20231223215147.GA69623@nathanxps13
1 parent 7e6fb5d commit da083b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/postmaster/walsummarizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ GetOldestUnsummarizedLSN(TimeLineID *tli, bool *lsn_is_exact,
438438
LWLockMode mode = reset_pending_lsn ? LW_EXCLUSIVE : LW_SHARED;
439439
int n;
440440
List *tles;
441-
XLogRecPtr unsummarized_lsn;
441+
XLogRecPtr unsummarized_lsn = InvalidXLogRecPtr;
442442
TimeLineID unsummarized_tli = 0;
443443
bool should_make_exact = false;
444444
List *existing_summaries;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy