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 1urGx7-003Nrb-Ac for pgsql-general@arkaria.postgresql.org; Wed, 27 Aug 2025 14:16:42 +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 1urGx6-00FaeG-Pz for pgsql-general@arkaria.postgresql.org; Wed, 27 Aug 2025 14:16:41 +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 1urGx6-00Facj-FI for pgsql-general@lists.postgresql.org; Wed, 27 Aug 2025 14:16:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1urGx4-0021jZ-1c for pgsql-general@lists.postgresql.org; Wed, 27 Aug 2025 14:16:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 57REGXm31389083; Wed, 27 Aug 2025 10:16:33 -0400 From: Tom Lane To: Dimitrios Apostolou cc: Adrian Klaver , pgsql-general@lists.postgresql.org Subject: Re: In-order pg_dump (or in-order COPY TO) In-reply-to: <3541781s-75o7-26pp-46pp-qs54o4406192@tzk.arg> References: <3541781s-75o7-26pp-46pp-qs54o4406192@tzk.arg> Comments: In-reply-to Dimitrios Apostolou message dated "Wed, 27 Aug 2025 14:09:39 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1389081.1756304193.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 27 Aug 2025 10:16:33 -0400 Message-ID: <1389082.1756304193@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dimitrios Apostolou writes: > Dump is from PostgreSQL 16, it's pg_dump writing to stdout: > pg_dump -v --format=3Dcustom --compress=3Dnone --no-toast-compression --= serializable-deferrable db_name | borg create ... Don't use --format=3Dcustom (and not -v either). That causes pg_dump to include the OIDs and pg_dump object IDs of all the tables and other objects, which will all be different in a dump from the new server. The actual data contents of the tables should be the same, but apparently the differences in the entry headers are enough to mislead borgbackup. You might be well advised to manually examine the data you are stuffing into borgbackup. Right now we seem to be operating on hypotheses, not facts, about what that looks like and how it's different between your old and new server. regards, tom lane