pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthew <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: 7 hrs for a pg_restore?
Date: Wed, 20 Feb 2008 13:46:55 -0500
Message-ID: <14182.1203533215@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0802201811330.20402@aragorn.flymine.org>
References: <200802191303.58840.doug@hunley.homeip.net>
	<1203445403.3846.86.camel@dogma.ljc.laika.com>
	<2e78013d0802200101q44dbe6edvac067c39629ed9cd@mail.gmail.com>
	<1203530687.3846.151.camel@dogma.ljc.laika.com>
	<Pine.LNX.4.64.0802201811330.20402@aragorn.flymine.org>

Matthew <matthew@flymine.org> writes:
> 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.

How long ago was that?  There used to be some issues with two CREATE
INDEXes both trying to update the pg_class row, but I thought we'd fixed
it.

			regards, tom lane



view thread (42+ messages)  latest in thread

Message-ID: <14182.1203533215@sss.pgh.pa.us>
Permalink:  ../14182.1203533215@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14182.1203533215@sss.pgh.pa.us

 · 

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: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, matthew@flymine.org
  Subject: Re: 7 hrs for a pg_restore?
  In-Reply-To: <14182.1203533215@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