Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rH9vh-001FIQ-Km for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Dec 2023 21:53:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rH9uf-00559z-9Q for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Dec 2023 21:52:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rH9ue-00558p-Vy for pgsql-hackers@lists.postgresql.org; Sat, 23 Dec 2023 21:52:04 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rH9uQ-00BsaI-SG for pgsql-hackers@postgresql.org; Sat, 23 Dec 2023 21:52:03 +0000 Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7b7fbe3db16so130499739f.3 for ; Sat, 23 Dec 2023 13:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703368310; x=1703973110; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=eV/HRDSi8b9a1mFPqNb+zLpC078o07wStaoQdyiXNOA=; b=fZGJFROIq32AWUAMuqi4qzKTflXKSjMYRfDnJ+MvmMFkw/M8UGtAE/4NleIXOu0DCp liT+fVKqFNj5fdMSu/DqjeWPTTuWFxubVjW2RHuJFAPn6eiKXWwuvL8fpQ/MYr3S3pxk g7uWbWxnHbhZ74A1I8XI3WJtPR1QCBOW7Rb6Fs/rVv7KQGfMsu1OBuJGQU+MCzVkkduk 1VqM3pqjvlQj8dyYbcNfA5Wu0teQwUjORh1T3OE6Gw2rTCC6SAZDEinRKYwEOpEqIbJt JCiCuc9jymkF8JSohUXn89hNmc6M/iHRKy0pPDygaJZnSpFNsdnYADTDdXZek/P6chru Kl5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703368310; x=1703973110; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eV/HRDSi8b9a1mFPqNb+zLpC078o07wStaoQdyiXNOA=; b=iVMUB23A1G6qXy2muxN6CVXxKznLG1IU87y21ToWOQRGdM5Mez6JVe2kS8ZsR2FLl8 YL2ip69PFW3Xs+vw8aZ2Nmj2I01xAjmQOtaSl2TMeZ8HyvWcE8Oq5oCxX/4IAywnRcCt ap4gmYpkpKE0v0bU0KyoFjjZ7blLPThk5CHlNO+HKKvUsdpz2zEZ2hMVEVZ0sUHE93jq joKCLPJZbxZU+7rnTG6NPmmFL04Z+8kK1uGzNqooZhCYdw7Mj0Vb++SbeWMEIc/RkOvu p2lq/zK6i9uma6j0dJkrDDPolou4KOUy4DkH+xhiYqRz7mU4JbQ/VMNJrPL/E1u7kBI7 on8Q== X-Gm-Message-State: AOJu0YwLHAltw5MjLGUoz+lfDgrLzMOS2xreSBbsC6q8POiO/OBio5gh Lt4dgAn81XD7pxJIsfx4RMM= X-Google-Smtp-Source: AGHT+IFdC3m4LUclQVk/6V5I01i9AcnC44Qkid2eyn6J74LIQEBJ2ke+NMurg3Cmggw6tx0M81i4fQ== X-Received: by 2002:a05:6602:39e:b0:7b9:13f4:a234 with SMTP id f30-20020a056602039e00b007b913f4a234mr4322930iov.3.1703368310008; Sat, 23 Dec 2023 13:51:50 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ce12-20020a0566381a8c00b004664a0a7f2csm1805412jab.177.2023.12.23.13.51.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 13:51:48 -0800 (PST) Date: Sat, 23 Dec 2023 15:51:47 -0600 From: Nathan Bossart To: Alexander Lakhin Cc: Robert Haas , Jakub Wartak , Alvaro Herrera , Andres Freund , Peter Eisentraut , Dilip Kumar , "pgsql-hackers@postgresql.org" Subject: Re: trying again to get incremental backup Message-ID: <20231223215147.GA69623@nathanxps13> References: <061cccf7-0cac-804f-4c2a-9d6da8e3848b@gmail.com> <8b686764-7ac1-74c3-70f9-b64685a2535f@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8b686764-7ac1-74c3-70f9-b64685a2535f@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 --0OAP2g/MAC+5xKAE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="fix_uninitialized_warning.patch" 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; --0OAP2g/MAC+5xKAE--