PostgreSQL, partitioned index, concurrently, procedure, stored procedure, transaction

PostgreSQL, partitioned index, concurrently, procedure, stored procedure, transaction

Background
I have a partition table with tens of thousands of partitions, and I need to create indexes on tens of thousands of partitions. What should I do?

1. I am a quite busy or lazy

2. I am afraid that creating an index will affect the business (creating an index will block the dml if it is not added concurrently), I am…