You can first create the index on the table using the "On ONLY"keyword, something as below.CREATE INDEX idx ON ONLY tab(col1);Then create indexes on each partition in "concurrently" from multiple sessions in chunks.CREATE INDEX CONCURRENTLY idx_1 ON tab_part1(col1);CREATE INDEX CONCURRENTLY idx_2 ON tab_part2(col1);After this step finishes the table level index which was created in the first step will be in valid state automatically.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных