Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2HMu-00035R-WE for pgsql-performance@arkaria.postgresql.org; Wed, 11 Oct 2017 13:48:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2HMu-00035N-Im for pgsql-performance@arkaria.postgresql.org; Wed, 11 Oct 2017 13:48:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2HL9-0008PG-6G for pgsql-performance@postgresql.org; Wed, 11 Oct 2017 13:46:27 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e2HL6-000769-47 for pgsql-performance@postgresql.org; Wed, 11 Oct 2017 13:46:26 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 7E9284C914; Wed, 11 Oct 2017 15:46:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id Bb1hry9ZFWwk; Wed, 11 Oct 2017 15:46:20 +0200 (CEST) Message-ID: <1507729579.2627.13.camel@cybertec.at> Subject: Re: blocking index creation From: Laurenz Albe To: Neto pr , postgres performance list Date: Wed, 11 Oct 2017 15:46:19 +0200 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Neto pr wrote: > When creating index on table of approximately 10GB of data, the DBMS hangs (I think), > because even after waiting 10 hours there was no return of the command. > It happened by creating Hash indexes and B + tree indexes. > However, for some columns, it was successfully (L_RETURNFLAG, L_PARTKEY). > If someone has a hint how to speed up index creation so that it completes successfully. Look if CREATE INDEX is running or waiting for a lock (check the "pg_locks" table, see if the backend consumes CPU time). Maybe there is a long-running transaction that blocks the ACCESS EXCLUSIVE lock required. It could also be a prepared transaction. Yours, Laurenz Albe -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance