Re: pg_dump Running Slow - Mailing list pgsql-general

From Adrian Klaver
Subject Re: pg_dump Running Slow
Date
Msg-id 117051a7-9f97-4ae2-92fd-28ad5547df8e@aklaver.com
Whole thread Raw
In response to pg_dump Running Slow  (Yongye Serkfem <yserkfem@gmail.com>)
List pgsql-general


On 1/16/24 10:55 AM, Yongye Serkfem wrote:
Hello Engineers,
I trust you are all doing well. I need help on how to improve the speed of pg_dump. I took a pg_dump on a 1TB database, which took almost a whole day. I used this command: "pg_dump -U postgres -d dynamic -f /backups/." Also, how do I check on the progression of the process?


https://www.postgresql.org/docs/current/app-pgdump.html

"
j njobs
--jobs=njobs

Run the dump in parallel by dumping njobs tables simultaneously. This option may reduce the time needed to perform the dump but it also increases the load on the database server. You can only use this option with the directory output format because this is the only output format where multiple processes can write their data at the same time.

pg_dump will open njobs + 1 connections to the database, so make sure your max_connections setting is high enough to accommodate all connections.

<...>

"


"

-v
--verbose

Specifies verbose mode. This will cause pg_dump to output detailed object comments and start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error.

"


Sincerely your
Yongye Serkfem

pgsql-general by date:

Previous
From: David Ventimiglia
Date:
Subject: Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?
Next
From: Adrian Klaver
Date:
Subject: Re: Mimic ALIAS in Postgresql?