pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Nathan Bossart <nathandbossart@gmail.com>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jakub Wartak <jakub.wartak@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: trying again to get incremental backup
Date: Sat, 23 Dec 2023 15:51:47 -0600
Message-ID: <20231223215147.GA69623@nathanxps13> (raw )
In-Reply-To: <8b686764-7ac1-74c3-70f9-b64685a2535f@gmail.com >
References: <CA+TgmobPUXTfGC-2BTGAu5tOQQV_4x0HdOw_6o__rC0+X+1Yzw@mail.gmail.com >
<CAKZiRmwd3KTNMQhm9Bv4oR_1uMehXroO6kGyJQkiw9DfM8cMwQ@mail.gmail.com >
<CA+TgmoaGeZ=vWDYvWtPY-sP+6594HqLScvPMSSunyuYZVSWMpw@mail.gmail.com >
<CAKZiRmwTF8mj24f92mh+fiGiceO+myX6CnuYo6u2EJ+ok+Hy4Q@mail.gmail.com >
<CA+Tgmoar8+V1ycDPgT_-d+1pG_9uRn=qSPty2Y2PgNQBTqRsfQ@mail.gmail.com >
<061cccf7-0cac-804f-4c2a-9d6da8e3848b@gmail.com >
<CA+TgmobdU8Xa3bsU7F==U0vAS1KfkgvAnskjnSqagUB2gGFrcw@mail.gmail.com >
<f08f7c60-1ad3-0b57-d580-54b11f07cddf@gmail.com >
<CA+TgmoZetdarddiiw6CFW5UPUXuRMqaGRHRSiqRiKhmaqgE==Q@mail.gmail.com >
<8b686764-7ac1-74c3-70f9-b64685a2535f@gmail.com >
My compiler has the following complaint:
../postgresql/src/backend/postmaster/walsummarizer.c: In function ‘GetOldestUnsummarizedLSN’:
../postgresql/src/backend/postmaster/walsummarizer.c:540:32: error: ‘unsummarized_lsn’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
540 | WalSummarizerCtl->pending_lsn = unsummarized_lsn;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
I haven't looked closely to see whether there is actually a problem here,
but the attached patch at least resolves the warning.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
Attachments:
fix_uninitialized_warning.patch (text/x-diff, 577B) download
diff --git a/src/backend/postmaster/walsummarizer.c b/src/backend/postmaster/walsummarizer.c
index 9b5d3cdeb0..0cf6bbe59d 100644
--- a/src/backend/postmaster/walsummarizer.c
+++ b/src/backend/postmaster/walsummarizer.c
@@ -438,7 +438,7 @@ GetOldestUnsummarizedLSN(TimeLineID *tli, bool *lsn_is_exact,
LWLockMode mode = reset_pending_lsn ? LW_EXCLUSIVE : LW_SHARED;
int n;
List *tles;
- XLogRecPtr unsummarized_lsn;
+ XLogRecPtr unsummarized_lsn = InvalidXLogRecPtr;
TimeLineID unsummarized_tli = 0;
bool should_make_exact = false;
List *existing_summaries;
view thread (106+ messages) latest in thread
Message-ID: <20231223215147.GA69623@nathanxps13>
Permalink: ../20231223215147.GA69623@nathanxps13/
Also on: postgresql.org/message-id/20231223215147.GA69623@nathanxps13
copy link · copy postgr.es · copy git am
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, exclusion@gmail.com, robertmhaas@gmail.com, jakub.wartak@enterprisedb.com, alvherre@alvh.no-ip.org, andres@anarazel.de, peter@eisentraut.org, dilipbalaut@gmail.com
Subject: Re: trying again to get incremental backup
In-Reply-To: <20231223215147.GA69623@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox