Re: Confused comment about drop replica identity index
Вложения
В списке pgsql-hackers по дате отправления:
| От | Michael Paquier |
|---|---|
| Тема | Re: Confused comment about drop replica identity index |
| Дата | |
| Msg-id | YdKqBchHjcj1e2vH@paquier.xyz обсуждение |
| Ответ на | RE: Confused comment about drop replica identity index ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>) |
| Список | pgsql-hackers |
On Thu, Dec 30, 2021 at 06:45:30AM +0000, houzj.fnst@fujitsu.com wrote: > I think forbids DROP INDEX might not completely solve this problem. Because > user could still use other command to delete the index, for example: ALTER > TABLE DROP COLUMN. After dropping the column, the index on it will also be > dropped. > > Besides, user can also ALTER REPLICA IDENTITY USING INDEX "primary key", and in > this case, when they ALTER TABLE DROP CONSTR "PRIMARY KEY", the replica > identity index will also be dropped. Indexes related to any other object type, like constraints, are dropped as part of index_drop() as per the handling of dependencies. So, by putting a restriction there, any commands would take this code path, and fail when trying to drop an index used as a replica identity. Why would that be logically a problem? We may want errors with more context for such cases, though, as complaining about an object not directly known by the user when triggering a different command, like a constraint index, could be confusing. -- Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера