From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Scalia <jayknowsunix@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Very long index build time
Date: Thu, 09 Feb 2017 12:46:43 -0500
Message-ID: <18942.1486662403@sss.pgh.pa.us> (raw)
In-Reply-To: <CABzCKRCd=Wx2gHMFZSjBpPQGi4LgFQnGPrw6h+ZpZgV6TcUJFw@mail.gmail.com>
References: <CABzCKRCd=Wx2gHMFZSjBpPQGi4LgFQnGPrw6h+ZpZgV6TcUJFw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
John Scalia <jayknowsunix@gmail.com> writes:
> I'm building a test database for our data warehouse,and I'm trying to build
> a trigram index on one of the tables with a 4000 character varchar field,
> Yes, I want to change this table at some point to make that attribute a
> text field, along with some other structural changes. but that's in the
> future. This particular table reports to be approximately 420 Gb. My
> question is fairly simple, this index has been building since Tuesday
> morning @ 9:52AM EST - nearly 48 hours. Does this sound like a normal build
> time? The command I used is:
> CREATE INDEX CONCURRENTLY test_schema_notes_trigram_idx on
> test_schema.notes USING gin (notes gin_trgm_ops);
Well, the first question is whether the index building session is actually
doing anything or just waiting. Is it consuming CPU time? It might just
be waiting around for some other transaction to finish --- there are
multiple places in a CREATE INDEX CONCURRENTLY sequence where we have to
wait out all other open transactions.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, jayknowsunix@gmail.com
Subject: Re: Very long index build time
In-Reply-To: <18942.1486662403@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox