Re: pg_restore scan - Mailing list pgsql-general

From Adrian Klaver
Subject Re: pg_restore scan
Date
Msg-id d39f835e-80dd-4e9f-8a19-c9af363be6d6@aklaver.com
Whole thread Raw
In response to pg_restore scan  (R Wahyudi <rwahyudi@gmail.com>)
Responses Re: pg_restore scan
List pgsql-general
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 <https://www.postgresql.org/message-id/ 
> 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



pgsql-general by date:

Previous
From: R Wahyudi
Date:
Subject: pg_restore scan
Next
From: R Wahyudi
Date:
Subject: Re: pg_restore scan