Обсуждение: [PERFORM] Postgres 9.5 / 9.6: Restoring PG 9.4 dump is very very slow

Поиск
Список
Период
Сортировка

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

От
Hans Braxmeier
Дата:

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

Re: [PERFORM] Postgres 9.5 / 9.6: Restoring PG 9.4 dump is very very slow

От
Tom Lane
Дата:
Hans Braxmeier <hans.braxmeier@outlook.com> writes:
> 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
samesystem (even if I make a PG 9.5/9.6 dumps and try to restore this one)! 

Can you provide a test case demonstrating this sort of slowdown?

            regards, tom lane