| От | Alvaro Herrera |
|---|---|
| Тема | partitioned indexes and tablespaces |
| Дата | |
| Msg-id | 20181102003138.uxpaca6qfxzskepi@alvherre.pgsql обсуждение исходный текст |
| Ответы |
Re: partitioned indexes and tablespaces
|
| Список | pgsql-hackers |
Hello A customer reported to us that partitioned indexes are not working consistently with tablespaces: 1. When a CREATE INDEX specifies a tablespace, existing partitions get the index in the correct tablespace; however, the parent index itself does not record the tablespace. So when new partitions are created later, they get the index in the default tablespace instead of the specified tablespace. Fix by saving the tablespace in the pg_class row for the parent index. 2. ALTER TABLE SET TABLESPACE, applied to the partitioned index, would raise an error indicating that it's not the correct relation kind. In order for this to actually work, we need bespoke code for ATExecCmd(); the code for all other relation kinds wants to move storage (and runs in Phase 3, later), but these indexes do not have that. Therefore, write a cut-down version which is invoked directly in ATExecCmd instead. 3. ALTER INDEX ALL IN TABLESPACE, identical problem, is also fixed by the above change. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера