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 1rShcq-00FNv9-12 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2024 18:05:24 +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 1rShco-007CKp-MI for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2024 18:05:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rShco-007CKh-CZ for pgsql-hackers@lists.postgresql.org; Wed, 24 Jan 2024 18:05:22 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rShcl-003Vnm-MG for pgsql-hackers@lists.postgresql.org; Wed, 24 Jan 2024 18:05:21 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-3627f61fc15so8974085ab.2 for ; Wed, 24 Jan 2024 10:05:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706119517; x=1706724317; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QTF+yIKlov9R7cjjQYiAEGTcGO3KzIv/8v0dn957hAg=; b=aUSjUfI24ydh2P4idfnGK7tHLPF0QFFrCJAqc6PoxzuEejwd6OWi4ljhiUAZI0JUdT W//viOphy/3m3WdM153ompVGwiRCXE0oG6ckhRM8VH9iIh+oK1e1CyWSTsfZd8Uiv99l 35+dLaCXp2FKYdzG0xwXIHL7O1soI/UnZnsfu3PNOl/xe2CvpDupLGoej6sIWjaxQv2s j8MJ64hAEA8i8zi2p1PWjqAxsjmS4T+/S+vS6mwvSFFDxWlvIl/yHduLnJiZclmEb+6O 0yGYtfDe/h8uQIqBI1snI3qV6KqM1jtH9Db9KwB20wPaZQlolVYOZ3j7XUKYGr202WvN Hb7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706119517; x=1706724317; h=in-reply-to: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=QTF+yIKlov9R7cjjQYiAEGTcGO3KzIv/8v0dn957hAg=; b=fHRhawpVcNIS5fUkRGGOcLY4ZHzD/7kJqOePRzgc4kHqZ7DOT6Rt6n5j5FMjEgFWkJ ExBUFOnEJfJUsGt8oOFVuktnjdtYGBHqiQqp7IRno3TrIpJMSi0NkUIxxWN0pn6cJXJd cDokoP4Hvr2SoDitnCxJMCJruCdDnepF/nzzegy8IKP6nLPm6oc2jvOguE1jbSpS1YJi VcrYomuzpZWdtI+FJNXT+PaiJ/b3H7JfmS4XzyIAySsVWQxI1Z9rJUmD6V8/IjQ47QSF NhuL4CWJbNPWVBhG/UKrD8m026Nb7RHYvNXmjniEX6yn/wCVPQDAs2g22mMHtFcq+Ne0 E64A== X-Gm-Message-State: AOJu0YyrenMuhyQtdlxRo4m9nusDhiqz2HT+qupdFJwSRHqdJ+gNy8M3 cxrQINIE6QhWkuvYrdItLpsXrMbseuMplOWyRgFoK2TD7XAfnSrpQYmp0lhH X-Google-Smtp-Source: AGHT+IGyr/xWOWDivyHSARjyaNFHPCTbTRaXQsu1fWo4vkKPecPlrjQamocXPVZ+bPm2GWxutu3TGA== X-Received: by 2002:a05:6e02:78c:b0:361:ab13:f595 with SMTP id q12-20020a056e02078c00b00361ab13f595mr2025412ils.45.1706119517573; Wed, 24 Jan 2024 10:05:17 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id r12-20020a02c84c000000b0046eda09d55esm2241559jao.179.2024.01.24.10.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 10:05:17 -0800 (PST) Date: Wed, 24 Jan 2024 12:05:15 -0600 From: Nathan Bossart To: Robert Haas Cc: Matthias van de Meent , PostgreSQL Hackers Subject: Re: cleanup patches for incremental backup Message-ID: <20240124180515.GA2709722@nathanxps13> References: <20240124170846.GA2643050@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 24, 2024 at 12:46:16PM -0500, Robert Haas wrote: > The "examining summary" line is generated based on the output of > pg_available_wal_summaries(). The way that works is that the server > calls readdir(), disassembles the filename into a TLI and two LSNs, > and returns the result. Then, a fraction of a second later, the test > script reassembles those components into a filename and finds the file > missing. If the logic to translate between filenames and TLIs & LSNs > were incorrect, the test would fail consistently. So the only > explanation that seems to fit the facts is the file disappearing out > from under us. But that really shouldn't happen. We do have code to > remove such files in MaybeRemoveOldWalSummaries(), but it's only > supposed to be nuking files more than 10 days old. > > So I don't really have a theory here as to what could be happening. :-( There might be an overflow risk in the cutoff time calculation, but I doubt that's the root cause of these failures: /* * Files should only be removed if the last modification time precedes the * cutoff time we compute here. */ cutoff_time = time(NULL) - 60 * wal_summary_keep_time; Otherwise, I think we'll probably need to add some additional logging to figure out what is happening... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com