Re: Indexing Strategy for Partitioned Table in PostgreSQL 15.13
От | DINESH NAIR |
---|---|
Тема | Re: Indexing Strategy for Partitioned Table in PostgreSQL 15.13 |
Дата | |
Msg-id | PN4P287MB4381D8F12608B6572F14A5C89C22A@PN4P287MB4381.INDP287.PROD.OUTLOOK.COM обсуждение исходный текст |
Ответ на | Re: Indexing Strategy for Partitioned Table in PostgreSQL 15.13 ("David G. Johnston" <david.g.johnston@gmail.com>) |
Список | pgsql-admin |
Hi,
For partition tables concurrent indexes are not supported(checked in postgres 17.5 version )
Work around will be to create normal indexes on the main table.
Thanks
Dinesh Nair
From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Monday, August 4, 2025 11:05 AM
To: Mahesh Shetty <maheshetty20@gmail.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Indexing Strategy for Partitioned Table in PostgreSQL 15.13
Sent: Monday, August 4, 2025 11:05 AM
To: Mahesh Shetty <maheshetty20@gmail.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Indexing Strategy for Partitioned Table in PostgreSQL 15.13
Caution: This email was sent from an external source. Please verify the sender’s identity before clicking links or opening attachments.
On Sunday, August 3, 2025, Mahesh Shetty <maheshetty20@gmail.com> wrote:
I have a large partitioned table with around 100 partitions, and we're planning to add an index to it. I'm a bit concerned about the potential impact and duration of the indexing process,
It will end very quickly…
and I’d appreciate your inputs on the following:
If I run
CREATE INDEX CONCURRENTLY
on the parent table, will it automatically create indexes concurrently on all its partitions?
Sometimes it’s best to just try (I didn’t though)…but the answer is explicitly documented (see create index)
Concurrent builds for indexes on partitioned tables are currently not supported. However, you may concurrently build the index on each partition individually and then finally create the partitioned index non-concurrently in order to reduce the time where writes to the partitioned table will be locked out. In this case, building the partitioned index is a metadata only operation.
David J.
В списке pgsql-admin по дате отправления: