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 1r3gGi-0055NL-1M for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Nov 2023 17:35:08 +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 1r3gFi-0086xY-H6 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Nov 2023 17:34:06 +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 1r3gFh-0086xM-Hi for pgsql-hackers@lists.postgresql.org; Thu, 16 Nov 2023 17:34:06 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3gFe-006lyD-9u for pgsql-hackers@postgresql.org; Thu, 16 Nov 2023 17:34:04 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id C25833200934; Thu, 16 Nov 2023 12:33:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 16 Nov 2023 12:34:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700156039; x= 1700242439; bh=RONvZmJPj+HiWj8dVHFAXNGMNR1d1hsS9OCBczVWSoI=; b=I VunUKskzm1T0f0DakpUE70RcxLYrBwv4wEt3kLxPMuSxbCXhJfN+ZU2IWwiL0BTB dcMhrwRZaPWT6YLQR/lc8hLsOymstz7Fv/abkkLHycElbLPuoJyEVtUqsKJzMefG w0PRrevtgeD1z1rMf1rvDfk6tSRjp6g00ibCwQ/5lFpn1GVZrrqsWCxcB6PX7N7X 98pky3sxMgVzAE9p44iBvb6+rwEPI8AeNjE4eh9FYm9YzRHIdNm7rT/pKSgbQjP5 CgV0ST7x0UckwTpq38p0NwmQKkwzxJHyWB0IkEK/SJcd20nDu8qjdM1su19skor/ lS0X69kClml+suSna0WPg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefkedguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeej keffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Nov 2023 12:33:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1700156035; bh=PGvylQcKUTx4M5mGPHPML5z8JaYa9JtSeqRRNv2U01c=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Na2W+ULgdx1fUYzGb18XBaljc4yaV+kzxjQ5QB4i4Qu73irQaV6TlfjMJnkiQX7lU ZYC7Z6XaxkiExKrqg9ImnpJ44k6gjONi5AGZc6212Oi6J6N2yAfalAbBlmOegsg1m3 h4lbCGj0EIHQYEBwjakkLWut7pTx4J4Wgwvx90DPSAjbY9ZsGY+kV/NFAknqWFi8Tu bN4vmszSPOfWY3BtHrgUd9dxh3PXp7cJL1DnfnyR9OH0ss0tSXO5JBYmkV/IO6DuY/ iVRjtqrBXnjiiyVxQZGi9FGO+vTWh9oUlfcl70NqFJGqYBFl0AHj/xciS1CcV/2l4b /9+Xp4NKFBHOg== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E32B7DE; Thu, 16 Nov 2023 18:33:55 +0100 (CET) Date: Thu, 16 Nov 2023 18:33:55 +0100 From: Alvaro Herrera To: Robert Haas Cc: Dilip Kumar , Andres Freund , "pgsql-hackers@postgresql.org" , Peter Eisentraut Subject: Re: trying again to get incremental backup Message-ID: <202311161733.vnoq44nsmguk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202311161726.qzbi7b7ln6lk@alvherre.pgsql> <202311161723.cffoiarzi5fl@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Nov-16, Alvaro Herrera wrote: > On 2023-Oct-04, Robert Haas wrote: > > - Right now, I have a hard-coded 60 second timeout for WAL > > summarization. If you try to take an incremental backup and the WAL > > summaries you need don't show up within 60 seconds, the backup times > > out. I think that's a reasonable default, but should it be > > configurable? If yes, should that be a GUC or, perhaps better, a > > pg_basebackup option? > > I'd rather have a way for the server to provide diagnostics on why the > summaries aren't being produced. Maybe a server running under valgrind > is going to fail and need a longer one, but otherwise a hardcoded > timeout seems sufficient. > > You did say later that you thought summary files would just go from one > checkpoint to the next. So the only question is at what point the file > for the last checkpoint (i.e. from the previous one up to the one > requested by pg_basebackup) is written. If walsummarizer keeps almost > the complete state in memory and just waits for the checkpoint record to > write it, then it's probably okay. On 2023-Nov-16, Alvaro Herrera wrote: > On 2023-Nov-16, Robert Haas wrote: > > > On Thu, Nov 16, 2023 at 5:21 AM Alvaro Herrera wrote: > > > It's not clear to me if WalSummarizerCtl->pending_lsn if fulfilling some > > > purpose or it's just a leftover from prior development. I see it's only > > > read in an assertion ... Maybe if we think this cross-check is > > > important, it should be turned into an elog? Otherwise, I'd remove it. > > > > I've been thinking about that. One thing I'm not quite sure about > > though is introspection. Maybe there should be a function that shows > > summarized_tli and summarized_lsn from WalSummarizerData, and maybe it > > should expose pending_lsn too. > > True. Putting those two thoughts together, I think pg_basebackup with --progress could tell you "still waiting for the summary file up to LSN %X/%X to appear, and the walsummarizer is currently handling lsn %X/%X" or something like that. This would probably require two concurrent connections, one to run BASE_BACKUP and another to inquire server state; but this should easy enough to integrate together with parallel basebackup later. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/