Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately
Дата
Msg-id 22849.1218389336@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE name RENAME TO new_name; does notworkimmediately  (Gregory Stark <stark@enterprisedb.com>)
Ответы 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
Gregory Stark <stark@enterprisedb.com> writes:
> On the other hand the problem does not occur if the CREATE TABLE is in the
> same session. Nor if the REINDEX DATABASE is skipped.

It appears that you have to do the RENAME TABLE in the same session as
the REINDEX DATABASE.  Furthermore, the failure then persists into
subsequent sessions.  There is a "yyy" entry in pg_class, but index
searches using pg_class_relname_nsp_index don't find it.

Also, I can still reproduce it with just REINDEX TABLE pg_class instead
of REINDEX DATABASE.

What I suspect is we've broken the logic that manages REINDEX applied to
pg_class itself.  There's a mighty delicate dance that goes on there,
and we haven't tested it too much lately.

            regards, tom lane

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

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