| От | Sergei Kornilov |
|---|---|
| Тема | using index or check in ALTER TABLE SET NOT NULL |
| Дата | |
| Msg-id | 81911511895540@web58j.yandex.ru обсуждение исходный текст |
| Ответы |
Re: using index or check in ALTER TABLE SET NOT NULL
|
| Список | pgsql-hackers |
Hello I write patch to speed up ALTER TABLE SET NOT NULL by check existed check constraints or indexes. Huge phase 3 with verifytable data will be skipped if table has valid check constraint cover "alteredfield IS NOT NULL" condition or by SPIquery if found index with compatible condition or regular amsearchnulls index on processed field. Patch based on current master branch, i believe it has no platform-dependent code, of course code compiled and pass testslocally. Tell me please, what i forgot or make incorrectly. Implementation notes: I use existed PartConstraintImpliedByRelConstraint method to check relation constraints. But i rename original method tostatic ConstraintImpliedByRelConstraint (because method now used not only in partitions) and leave PartConstraintImpliedByRelConstraintas proxy to not change public API. I found it difficult to do index scan and choose index with lower costs if found many suitable indexes. Is it acceptableto use SPI here? Related archive discussions: https://www.postgresql.org/message-id/flat/530C10CF.4020101%40strangersgate.com https://www.postgresql.org/message-id/flat/CAASwCXdAK55BzuOy_FtYj2zQWg26PriDKL5pRoWiyFJe0eg-Hg%40mail.gmail.com Thanks!
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера