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 1uu8fV-0035tA-5V for pgsql-general@arkaria.postgresql.org; Thu, 04 Sep 2025 12:02:22 +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 1uu8fU-00FfZf-9M for pgsql-general@arkaria.postgresql.org; Thu, 04 Sep 2025 12:02:20 +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 1uu8fT-00FfXY-Ud for pgsql-general@lists.postgresql.org; Thu, 04 Sep 2025 12:02:20 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uu8fS-000VDb-2A for pgsql-general@lists.postgresql.org; Thu, 04 Sep 2025 12:02:19 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5D7937A03E9; Thu, 4 Sep 2025 08:02:18 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 04 Sep 2025 08:02:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1756987338; x= 1757073738; bh=zyQOuzVJ28EQwFJuL8kyIv1f+0ni5KWEZ/eACttQh0c=; b=H Ihg6DCbehxPcBl18zHO3p/xxlauplfsfceNyj62EVBlroK0Q1Rjv90L6Aw0t4TDC kZ7ysdR9x9dmJb/szw4XCCqArGeCQahWlP2zYYieQi3dd5/J/Kafh51irkOopOkw OmtzzsMm8HiIO2Bu8xXkZFFM71oPHRxzyrubZAg7mFc5BnHvs0s+cFLjvh207b4u GJH7vGz+eoFBeJoIr3WTO+P7v+T9roRW3SAuKg3BoWtpAmfJdMbfM7UNJU2K0Klp s2dewk27zB41GE/66Bs+mm4R+1k1BKoc76JNhhYxupThHYZHvPfwh1t22mz1ngkV yh3oHBQKJ/YV1gPiSToRw== 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:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1756987338; x=1757073738; bh=z yQOuzVJ28EQwFJuL8kyIv1f+0ni5KWEZ/eACttQh0c=; b=SaHcXjyo4WI7Sop8c Kx33Pkh1fGBXrww58LRaAd5//Ku/Pd8Sdge8xxfq0wJFLsM/HjWYyhES8QdBqWhV v2dedVQreolyVdZ7/8amb/t7PtgrbllqU4NaEaq9x6fH/Ka6RudgUcvghxqz0ZBt Xel3ROB6Dj+cNymwKhVLzwtSo/lpmFIhzd+aL9fIgY8ANi55ZFjNsVRAEbqt+5k7 nB92is+/H9YljVrFzlf1hkfu/7zVrjgRhrBXWS/Iug5LWRiDcIG5irEQ5UZf99PZ SBvOvQ8I/+gzpIy/7SS5YYccjVEJMyJzgAjjLbziqT2OpXhjjLmPMdQ8y1GEqnwG s3v9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdehleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttd ejnecuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgeskhhu rhhilhgvmhhurdguvgeqnecuggftrfgrthhtvghrnhepheeuuddtieeuleeujeetueevle eukeduheelleehheefjeefheduleetffektdelnecuffhomhgrihhnpegvnhhtvghrphhr ihhsvggusgdrtghomhdpthhhvghlihhnuhigrhgvvhhivgifrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsehk uhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuth dprhgtphhtthhopehjihhmihhssehgmhigrdhnvghtpdhrtghpthhtohepphhgshhqlhdq ghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Sep 2025 08:02:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1756987335; bh=EOlFgdHE52D8fPsaA48PEB6mI+fYnz/LgWbCKcRexpg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=IdDo2wQcYmKNSZNpMU7G+wQZgJCnAXIdl4U4muxnmnReErqpqAnYfUUURePseFsO0 uDIv0YOdF/ED/U6BooHfAF7k2cquNaAPunn1o66qyFn6o2lsMvxkbzvof3e60il4fs P2Vq7BvGxnqYRkNUOQTW1IfelXVFDP5AYc4bkkXu13zyfWbgL993cwr6TrRS/1EO3+ wyaLHF9XzdtD7Lv/vUjK75TVbT3fJQaKelzpSt/oWHH1asheRPEZPgLXU1pbfgsw9t g1JRZkefbgJChnn2RHzQMFTz/tOs+qW+SdwI4nMbI+NY3+xiwCdIONzrTr7anYDhQ4 8MimVgGPBirGA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 11D2290; Thu, 4 Sep 2025 14:02:15 +0200 (CEST) Date: Thu, 4 Sep 2025 14:02:15 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Dimitrios Apostolou Cc: pgsql-general@lists.postgresql.org Subject: Re: In-order pg_dump (or in-order COPY TO) Message-ID: <202509041202.ml2xi5yp46yt@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Aug-26, Dimitrios Apostolou wrote: > I am storing dumps of a database (pg_dump custom format) in a de-duplicating > backup server. Each dump is many terabytes in size, so deduplication is very > important. And de-duplication itself is based on rolling checksums which is > pretty flexible, it can compensate for blocks moving by some offset. Hello, It's generally considered nowadays that pg_dump is not the best option to create backups of very large databases. You may be better served by using a binary backup tool -- something like Barman. With current Postgres releases you can create incremental backups, which would probably be more effective at deduplicating than playing with pg_dump's TOC, because it's based on what actually happens to the data. Barman provides support for hook scripts, which perhaps can be used to transfer the backup files to Borg. (I haven't actually tried to do this, but the Barman developers talk about using them to transfer the backups to tape, so I imagine getting them to play with Borg it's a Simple Matter of Programming.) -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "On the other flipper, one wrong move and we're Fatal Exceptions" (T.U.X.: Term Unit X - http://www.thelinuxreview.com/TUX/)