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 1uyeHU-00AsRP-Oa for pgsql-general@arkaria.postgresql.org; Tue, 16 Sep 2025 22:36:12 +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 1uyeHQ-002zuA-Is for pgsql-general@arkaria.postgresql.org; Tue, 16 Sep 2025 22:36:09 +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 1uyeHP-002ztz-Hh for pgsql-general@lists.postgresql.org; Tue, 16 Sep 2025 22:36:09 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uyeHK-000nQP-2K for pgsql-general@lists.postgresql.org; Tue, 16 Sep 2025 22:36:07 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 416AE7A02F5; Tue, 16 Sep 2025 18:36:02 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Tue, 16 Sep 2025 18:36:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= 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=1758062162; x=1758148562; bh=guMNmQ7AcnHC9G0aMp4zC4K4X8fgarZcbeprdyzgTA0=; b= ZcGTQiNzaZMUqsNnEm03tufCWjdFVisB7miZQ731hfnYVisY6Fij8tAbCl76EbpF XfV8fXpjuvi377D36jNMRXhdFxfiV/FGp3nCFvd+xLNuYhBdgqv2w+g/yGJToQ/D NIKUu6ju+8nOF8O1Ym7cnvEnlq/TZcmI3ux2+WtPzuKj/po3Qa1KRi3Y6POOxayh FjcFv8PDtZg4JChjRkVIPOsxcTpnyOs4GtHfa57m7iRNxpI9mVHXQVTB8nRtSZJv kUgu6jFMe0Ye094UyKiQ+XLgSRMHVOMsBpsKA8OitO+xr0BviaCtqkk5UAETJ5L9 xGt/p+00G+e2J7E+5ngxYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1758062162; x=1758148562; bh=g uMNmQ7AcnHC9G0aMp4zC4K4X8fgarZcbeprdyzgTA0=; b=CnkQVTS7Ubg1ORhoB LcseP1qBoxpPyTSQg3axeqT5yEXvyNzMMAPmU9Neod0W5WNlMzuTKvXoWlGgj/ew 0hJfLvH/e1DovPyDvgE+V4/9E9uhvtTqIFARuQnOUvU3ixWEocwbg/tclblID23C tSdi2+CN5x9uGmGSeRDrhhhutAz+8D+Fi6RfdRwQVfxC8A4vdW74QiR+f8ZDyBlb ilyokQJWB+PYrR252R5jwBF+48JG6hV0MlYNzXLPyu5mWXD/tCE0y19BuPUL3HHR yqEZYog7WUmACNOShS7F9grbOH5nIKdE+XHePITTkIsn3Z6thhLS/gZPhtnIDbsD 6+OoQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdegudejkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeetughrihgrnhcu mfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqne cuggftrfgrthhtvghrnhepheeguefhhfetueffveetvddvueehfeelleejgfdvheeiiefh veeugeejteffjedtnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpgedtgh hmgidrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtph htthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehrfigrhhihuhguihes ghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsth hsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Sep 2025 18:36:01 -0400 (EDT) Message-ID: Date: Tue, 16 Sep 2025 15:36:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_restore scan To: R Wahyudi , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: 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 9/16/25 15:25, R Wahyudi wrote: > > I'm trying to troubleshoot the slowness issue with pg_restore and > stumbled across a recent post about pg_restore scanning the whole file : > > > "scanning happens in a very inefficient way, with many seek calls and > small block reads. Try strace to see them. This initial phase can take > hours in a huge dump file, before even starting any actual restoration." > see : https://www.postgresql.org/message-id/E48B611D-7D61-4575-A820- > B2C3EC2E0551%40gmx.net E48B611D-7D61-4575-A820-B2C3EC2E0551%40gmx.net> This was for pg_dump output that was streamed to a Borg archive and as result had no object offsets in the TOC. How are you doing your pg_dump? -- Adrian Klaver adrian.klaver@aklaver.com