Search Postgresql Archives

Re: pg_dump slower than pg_restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 3, 2014 at 10:04 AM, David Wall <d.wall@xxxxxxxxxxxx> wrote:
I'm running PG 9.3.4 on CentOS 6.4 and noted that backing up my database takes much longer than restoring it.
 
Are you dumping to a slower disk/storage than the database is using?

What does top -c look like during the dump vs. the restore? I.e. can you identify the differing bottlenecks in the two cases and dig in further from there.

My backup script runs vacuumlo, then vacuum, then analyze, then pg_dump --format=c --oids $DB

How long does the backup take if you don't vacuum/analyze? On some of my dbs that would be a huge part of the time. Honestly I'd pull the vacuum/analyze out of the backup and into a different (nightly) task, there's no real benefit doing as part of the backup task, other than just getting it done. Analyzing after the restore would be a better time to do it, to freshen up the statistics.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux