回复:how to create index concurrently on paritioned table - Mailing list pgsql-hackers

From 李杰(慎追)
Subject 回复:how to create index concurrently on paritioned table
Date
Msg-id b4308a95-38c9-4ec5-beca-cd3d161e77d3.adger.lj@alibaba-inc.com
Whole thread Raw
In response to Re: how to create index concurrently on paritioned table  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Hi Justin,

> Maybe I'm wrong, but I don't think there's any known difficulty - just that
> nobody did it yet.  You should pay attention to what happens on error, but
> hopefully you wouldn't need to add much code and can rely on existing code to
> paths to handle that right.

yes,  I am trying to learn the code of index definition.

> I think you'd look at the commits and code implementing indexes on partitioned
> tables and CREATE INDEX CONCURRENTLY.  And maybe any following commits with
> fixes.

> You'd first loop around all children (recursively if there are partitions which
> are themselves partitioned) and create indexes concurrently. 

As we all know, CIC has three transactions. If we recursively in n partitioned tables, 
it will become 3N transactions. If an error occurs in these transactions, 
we have too many things to deal...
 
If an error occurs when an index is created in one of the partitions, 
what should we do with our new index?

Thank you very much,

 Regards,  Adger




      



pgsql-hackers by date:

Previous
From: "李杰(慎追)"
Date:
Subject: 回复:how to create index concurrently on paritioned table
Next
From: Masahiko Sawada
Date:
Subject: Re: Corruption during WAL replay