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 1usQAZ-004w6g-3R for pgsql-general@arkaria.postgresql.org; Sat, 30 Aug 2025 18:19:20 +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 1usQAY-00GOOE-4Z for pgsql-general@arkaria.postgresql.org; Sat, 30 Aug 2025 18:19:18 +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 1usQAX-00GOO6-Dz for pgsql-general@lists.postgresql.org; Sat, 30 Aug 2025 18:19:18 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1usQAV-002Yyg-0x for pgsql-general@lists.postgresql.org; Sat, 30 Aug 2025 18:19:17 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id EB9FA7A0116; Sat, 30 Aug 2025 14:19:14 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Sat, 30 Aug 2025 14:19:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1756577954; x=1756664354; bh=WWA45j92DkxnC7v8R3DlXLeogjeqFLwezGgP78hHDqs=; b= zX70f7I01DG1ppGfzCUlnActkdwSE8NVMAmPGj5JTihr2oOKFfCgM+cZ6DQL89rc 7yKX9IupeW/aGbgoq4W1hQU7mRl1EN4HNI6yacO1zE4ucwFct5OeQ+NqHP5zttKs kgrRq/+HgN4UgY2fv9b7cUMLTW5vOp9DDCCKumIhCP+EIY4cSlAxMy0rRqw0u4Ej 9Tt2VL6HfCdW/UJ0PHWsJFGBwzPJFCHR/JpxL6PkYBpEF5XVxcVW16rkwQaa2okN BzpXElk5l0BuEEkVOtweoJ7+i23e9SMVHHJELKeswS5Cze2g0GbwDJA3yE3BzaLr D5UFYnjXM6iWU1Mu4VQF5A== 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 :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1756577954; x= 1756664354; bh=WWA45j92DkxnC7v8R3DlXLeogjeqFLwezGgP78hHDqs=; b=X BZDh9QZS5cWwihuAPgtYF+X5u4W1TWmSV3taJU03btZTiBsXnl7fJP4PzYWNwrA5 wfimnfJbKRfbNMsgm13x5mJRgjTP/OiCwCE/jf7CkDKocUBmcnsFlbmhNkNqHxNX r2Pr9zOIcTV4p0WieoQm2+lxYSMEjpDMjRNSxgnSOYBOLuSMr8jpp2QFIjDwwYpL 9fpd0ihEGDTz5u9RBCCm7tYoNO65aAVznqjMzlw81+rYl/sKS+1wdlfykBkYU/PV 6y7cgUYfVuTVz9zrtKc/4c59mm7OO0LNNg2294SSwBSU4otaLVaj7upo+tcqLLQp K0m/v7PT4ld4EBHn3E4bw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddukeejtdelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejre dttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeeuudefjeejgf fgtddtgeehgfekueevkeekieettedtkeffheeivdethfevffegueenucffohhmrghinhep phhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtgho mhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjh himhhishesghhmgidrnhgvthdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehl ihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 30 Aug 2025 14:19:14 -0400 (EDT) Message-ID: <0dc17a73-2372-4613-a50e-610ae7d02b93@aklaver.com> Date: Sat, 30 Aug 2025 11:19:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: In-order pg_dump (or in-order COPY TO) To: Dimitrios Apostolou Cc: pgsql-general@lists.postgresql.org References: <3541781s-75o7-26pp-46pp-qs54o4406192@tzk.arg> <4ss66r31-558o-qq24-332q-no351p7n5osr@tzk.arg> Content-Language: en-US From: Adrian Klaver In-Reply-To: <4ss66r31-558o-qq24-332q-no351p7n5osr@tzk.arg> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/27/25 09:10, Dimitrios Apostolou wrote: > > On Wednesday 2025-08-27 17:25, Adrian Klaver wrote: >> >> For completeness and just in case they may affect the output what do >> the patches do? > > Two patches for speeding up scanning an archive without TOC, like the > one I'm having (because it is piped into borg, instead of written to > file). These were activated, but shouldn't matter. They only build the > TOC in pg_restore's memory. Are you sure about that? I just did: pg_dump -Fc --compress=none --no-toast-compression -d test -U postgres | borg create --stats --stdin-name pg_file --stdin-user aklaver --stdin-group aklaver borg_test/::PgTest - Then: borg mount borg_test/ mnt_tmp/ cd mnt_tmp/PgTest/ and then: pg_restore -l pg_file and I got a TOC. Or are you streaming the data out of the Borg archive? > > https://commitfest.postgresql.org/patch/5809/ > https://commitfest.postgresql.org/patch/5817/ > > And two patches for speeding up pg_restore like mentioned above, under > specific arguments that I didn't provide. (one speedup needs --clean, > and the other needs --freeze). > > https://commitfest.postgresql.org/patch/5821/ > https://commitfest.postgresql.org/patch/5826/ > > IIRC I did not activate them (via --clean) because TRUNCATE fails when > foreign keys exist. See the discussion threads. > > > Dimitris -- Adrian Klaver adrian.klaver@aklaver.com