回复:how to create index concurrently on paritioned table

From: 李杰(慎追) <adger(dot)lj(at)alibaba-inc(dot)com>
To: "Justin Pryzby" <pryzby(at)telsasoft(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, 曾文旌(义从) <wenjing(dot)zwj(at)alibaba-inc(dot)com>
Subject: 回复:how to create index concurrently on paritioned table
Date: 2020-06-12 08:17:34
Message-ID: b4308a95-38c9-4ec5-beca-cd3d161e77d3.adger.lj@alibaba-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-06-12 08:20:43 Re: Corruption during WAL replay
Previous Message 李杰 (慎追) 2020-06-12 08:06:28 回复:how to create index concurrently on paritioned table