Re: Creating multiple indexes in one table scan.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Creating multiple indexes in one table scan.
Date: 2012-05-24 18:09:37
Message-ID: 4FBE7961.8050105@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/24/2012 11:44 AM, Robert Haas wrote:
> On Thu, May 24, 2012 at 11:25 AM, Gurjeet Singh<singh(dot)gurjeet(at)gmail(dot)com> wrote:
>> It'd be great if one of standard utilities like pg_restore supported this,
>> by spawning every concurrent index build in separate backends. Just a
>> thought.
> If parallel restore doesn't already take this into account when doing
> job scheduling, that would be a worthwhile improvement to consider.
>
>

Parallel restore allows it in some cases, but not in others. You can't
create an index-backed constraint concurrently with any other index
because ALTER TABLE takes an ACCESS EXCLUSIVE lock.

We could get around that changing pg_dump to create the index first and
then add the constraint using the existing index.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2012-05-24 18:12:56 Re: Changing the concept of a DATABASE
Previous Message Magnus Hagander 2012-05-24 18:03:14 Re: shared_preload_libraries path