Thread: [PERFORM] Restoring Postgres Dump is very slow with Ubuntu 16.04

[PERFORM] Restoring Postgres Dump is very slow with Ubuntu 16.04

From
Hans Braxmeier
Date:

Hello,


restoring a dump with Ubuntu 16.04 using postgres.conf default configuration (autovacuum on) takes several hours, with Ubuntu 14.04 only 20 minutes. Turning autovacuum off in Ubuntu 16.04 makes restoring much faster, with 14.04 autovacuum off has nearly no effect. The PG version does not matter. Same results with PG 9.4/9.5/9.6.


Time to restore the dump

- Ubuntu 14.04 autovaccuum on: Sa 15. Apr 09:07:41 CEST 2017 - Sa 15. Apr 09:24:09 CEST 2017 -> 17 min
- Ubuntu 14.04 autovaccuum off: Sa 15. Apr 02:41:06 CEST 2017 - Sa 15. Apr 02:58:03 CEST 2017 -> 17 min
- Ubuntu 16.04 autovaccuum on: Sat Apr 15 03:22:07 CEST 2017 - Sat Apr 15 07:45:46 CEST 2017  > 4 hours

- Ubuntu 16.04 autovaccuum off: Sat Apr 15 09:19:20 CEST 2017 - Sat Apr 15 09:55:09 CEST 2017 -> 35 min

Do you have any idea what could cause this effect (what has changed in Ubuntu 16.04?) and should autovaccum be turned on again after restoring the dump? Does autovaccum slow down other Postgres queries?


Thanks for any help, Hans


PS: My last post "Postgres 9.5 / 9.6: Restoring PG 9.4 dump is very very slow" from yesterday (2017-04-14 23.30:10) was not correct. Sorry


Re: [PERFORM] Restoring Postgres Dump is very slow with Ubuntu 16.04

From
Andreas Kretschmer
Date:



Am 15.04.2017 um 10:11 schrieb Hans Braxmeier:

Hello,


restoring a dump with Ubuntu 16.04 using postgres.conf default configuration (autovacuum on) takes several hours, with Ubuntu 14.04 only 20 minutes. Turning autovacuum off in Ubuntu 16.04 makes restoring much faster, with 14.04 autovacuum off has nearly no effect. The PG version does not matter. Same results with PG 9.4/9.5/9.6.




Do you have any idea what could cause this effect (what has changed in Ubuntu 16.04?) and should autovaccum be turned on again after restoring the dump? Does autovaccum slow down other Postgres queries?


Autovacuum should always be on. Is the destination database (the whole db-cluster)  new and empty?

Regards, Andreas
-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com