Re: 7 hrs for a pg_restore?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Matthew <matthew(at)flymine(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: 7 hrs for a pg_restore?
Date: 2008-02-20 18:35:32
Message-ID: 1203532532.3846.158.camel@dogma.ljc.laika.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 2008-02-20 at 18:18 +0000, Matthew wrote:
> On Wed, 20 Feb 2008, Jeff Davis wrote:
> > However, building indexes in parallel would allow better CPU
> > utilization.
>
> We have a process here that dumps a large quantity of data into an empty
> database, much like pg_restore, and then creates all the indexes at the
> end. In order to speed up that bit, I initially made it spawn off several
> threads, and make each thread run a CREATE INDEX operation in parallel.
> However, this resulted in random errors from Postgres - something to do
> with locked tables. So I changed it so that no two threads create indexes
> for the same table at once, and that solved it.

What was the specific problem? Were they UNIQUE indexes? Were you trying
to write to the tables while indexing? Did you use "CONCURRENTLY"?

Regards,
Jeff Davis

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-02-20 18:46:55 Re: 7 hrs for a pg_restore?
Previous Message Matthew 2008-02-20 18:18:23 Re: 7 hrs for a pg_restore?