Postgres 9.5 / 9.6: Restoring PG 9.4 dump is very very slow

From: Hans Braxmeier <hans(dot)braxmeier(at)outlook(dot)com>
To: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Postgres 9.5 / 9.6: Restoring PG 9.4 dump is very very slow
Date: 2017-04-14 23:30:10
Message-ID: VI1PR04MB11364C57DD1FA57A376F4E1B99050@VI1PR04MB1136.eurprd04.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello,

after updating my server to Postgres 9.5 (or 9.6) I tried to import PG 9.4 dumps and/or to restore 9.5/9.6 dumps:

pg_dump testdb > db.sql
psql -d testdb -f db.sql

Restoring these dumps in PG 9.4 takes less than 20 minutes, restoring them in PG 9.5/9.5 takes several hours on the same system (even if I make a PG 9.5/9.6 dumps and try to restore this one)!
I also tried to restore dumps with the original PG 9.4/9.5.9.6 configuration as well as with different options like increasing max_wal_size in 9.5/9.6. e.g.
Do I miss a specific option in 9.5/9.6 which may be different to 9.4? If I turn off autovacuum (9.5/9.6) it's faster - but not as fast as with PG 9.4.

Example Log 9.5/9.6:

LOG: duration: 278349.128 ms statement: COPY test (id, ...)
LOG: duration: 646487.952 ms statement: ALTER TABLE ONLY test ...
The same with creating index... It takes hours with PG 9.5./9.6!

Thanks, Hans

<http://www.maps-for-free.com/>

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2017-04-14 23:40:58 Re: Postgres 9.5 / 9.6: Restoring PG 9.4 dump is very very slow
Previous Message Rick Otten 2017-04-13 21:17:07 Re: Impact of track_activity_query_size on high traffic OLTP system