Re: more than one index in a single heap pass? - Mailing list pgsql-hackers

From Glen Parker
Subject Re: more than one index in a single heap pass?
Date
Msg-id 4A5D1C4B.1030008@nwlink.com
Whole thread Raw
In response to Re: more than one index in a single heap pass?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: more than one index in a single heap pass?
List pgsql-hackers
Andrew Dunstan wrote:
> Well, yes, it's some of it, and in theory Tom's late addition of a queue 
> that gets all the dependencies of a table as soon as the table data is 
> restored should make that work better.  But of course, that's not the 
> only time indexes are created, and each index creation command will be 
> doing its own heap processing, albeit that synchronised scanning will 
> make that lots cheaper.
> 
> As I said originally, it was just an idle thought that came to me today.


Sounds to me like another reason to separate index definition from 
creation.  If an index can be defined but not yet created or valid, then 
you could imagine syntax like:

DEFINE INDEX blahblah1 ON mytable (some fields);
DEFINE INDEX blahblah2 ON mytable (some other fields);
[RE]INDEX TABLE mytable;

...provided that REINDEX TABLE could recreate all indexes simultaneously 
as you suggest.

-Glen



pgsql-hackers by date:

Previous
From: Ron Mayer
Date:
Subject: Re: Index-only scans
Next
From: Jeremy Kerr
Date:
Subject: Re: [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros