public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Hans Braxmeier <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Postgres Dump - Creating index never stops
Date: Wed, 12 Jul 2017 15:41:28 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <VI1PR04MB3022A9953FCF4847D336A39A99AF0@VI1PR04MB3022.eurprd04.prod.outlook.com>
References: <VI1PR04MB3022A9953FCF4847D336A39A99AF0@VI1PR04MB3022.eurprd04.prod.outlook.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgsql-performance>

Hans Braxmeier <[email protected]> writes:
> After restarting postgres (even with a new cluster) and creating a new database, postgres is hanging while extracting the dump: gunzip -c pixabay.gz | psql pixabay

> The log file shows that the autovacuum task is running (almost) endless...

> 2017-07-12 18:05:52.367 CEST [19586] hans@pixabay LOG:  duration: 11.609 ms  statement: CREATE INDEX photos_indexphoto_created ON photos_indexphoto USING btree (created);
> 2017-07-12 20:34:58.943 CEST [19626] ERROR:  canceling autovacuum task
> 2017-07-12 20:34:58.943 CEST [19626] CONTEXT:  automatic analyze of table "pixabay.public.photos_photo"
> 2017-07-12 20:34:59.942 CEST [19586] hans@pixabay LOG:  duration: 8947575.013 ms  statement: CREATE INDEX photos_photo_approved_by_id ON photos_photo USING btree (approved_by_id);

What that looks like is it took the system an unusually long time to
notice that it needed to cancel the autovacuum to avoid a deadlock
with the CREATE INDEX.  Was either process consuming a noticeable
amount of CPU during that interval?  Do you have deadlock_timeout
set higher than the default 1s?

			regards, tom lane


-- 
Sent via pgsql-performance mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Postgres Dump - Creating index never stops
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox