0

Restoring a dump on a Ubuntu 16.04 system takes several hours. Autovacuum is just canceled after waiting more than 3 hours (10926330.443 ms):

2016-07-20 05:20:00 CEST [78652-2414] LOCATION:  exec_simple_query, postgres.c:946
2016-07-20 08:22:05 CEST [79485-1] ERROR:  57014: canceling autovacuum task
2016-07-20 08:22:05 CEST [79485-2] CONTEXT:  automatic analyze of table "test.public.test"
2016-07-20 08:22:05 CEST [79485-3] LOCATION:  ProcessInterrupts, postgres.c:2965
2016-07-20 08:22:06 CEST [78652-2415] LOG:  00000: duration: 10926330.443 ms

I restored the same dump on a smaller system with Ubuntu 14.04 without any endless running autovacuum processes. What can be the reason?

Barmi
  • 439
  • 1
  • 6
  • 15
  • Ok... restoring the dump takes about 45 minutes with autovacuum = off, but it's still 3 times slower as on the other system and autovacuum = on... – Barmi Jul 20 '16 at 13:54
  • statement: ALTER TABLE ONLY testtable ADD CONSTRAINT testtable_lang_q_key UNIQUE (lang, q) takes 660753.097 ms. Has anybody an idea how to debug this special command? – Barmi Jul 22 '16 at 18:49

1 Answers1

0

It's a glibc bug: After upgrading from Ubuntu 14.10 (glibc 2.19) to 15.04 (glibc 2.21), we are experiencing a big performance regression in one particular PostgreSQL index creation. The index creation now takes more than 10 minutes, while before it was done in about 30 seconds.

https://sourceware.org/bugzilla/show_bug.cgi?id=18441

Barmi
  • 439
  • 1
  • 6
  • 15