Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately
Дата
Msg-id 23406.1218391414@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-bugs
I wrote:
> What I suspect is we've broken the logic that manages REINDEX applied to
> pg_class itself.

Hm, this is a HOT bug.  (Unless the OP found it on something older
than 8.3, in which case we might have more than one issue involved.)
What I'm seeing is that when heap_update checks to see if the new
pg_class tuple is HOT-updatable, RelationGetIndexAttrBitmap tells it
that only the OID is an indexed attribute, and so it does a HOT update,
leaving the wrong index entry in place.

Apparently, rd_indexattr needs to get cleared someplace where it
isn't being cleared right now.  I'm sure this is related to the
fancy dance we do for pg_class reindexing, but not sure yet where
to fix it.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately