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 1ur24z-00H8XB-VJ for pgsql-general@arkaria.postgresql.org; Tue, 26 Aug 2025 22:23:51 +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 1ur24y-00AwMl-U4 for pgsql-general@arkaria.postgresql.org; Tue, 26 Aug 2025 22:23:49 +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 1ur24y-00AwMC-JK for pgsql-general@lists.postgresql.org; Tue, 26 Aug 2025 22:23:49 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ur24w-0022FL-2i for pgsql-general@lists.postgresql.org; Tue, 26 Aug 2025 22:23:48 +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 57QMNjt41274777; Tue, 26 Aug 2025 18:23:45 -0400 From: Tom Lane To: Ron Johnson cc: "pgsql-generallists.postgresql.org" Subject: Re: In-order pg_dump (or in-order COPY TO) In-reply-to: References: <1273426.1756246099@sss.pgh.pa.us> Comments: In-reply-to Ron Johnson message dated "Tue, 26 Aug 2025 18:12:52 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1274775.1756247025.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 26 Aug 2025 18:23:45 -0400 Message-ID: <1274776.1756247025@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron Johnson writes: > On Tue, Aug 26, 2025 at 6:08=E2=80=AFPM Tom Lane wro= te: >> I'd expect pg_dump/pg_restore to preserve the physical row ordering, >> simply because it doesn't do anything that would change that. > But the rolling checksums are against a pg_dump file, not a pg_basebacku= p > file. Oh, that wasn't clear to me. > What probably changed are table OIDs. Would that change the ordering of > COPY data in post-restore dump files? It would not change the order of data within any one table. There are corner cases in which different OID assignments can cause pg_dump to emit database objects in a different order, see this recent thread: https://www.postgresql.org/message-id/flat/20250707192654.9e.nmisch%40goog= le.com regards, tom lane