ALTER TABLE name RENAME TO new_name; does not work immediately

Поиск
Список
Период
Сортировка
От megous@gmail.com
Тема ALTER TABLE name RENAME TO new_name; does not work immediately
Дата
Msg-id 3a6a83c5-832c-4c75-a522-16d5d2eda2d7@b1g2000hsg.googlegroups.com
обсуждение исходный текст
Ответы Re: ALTER TABLE name RENAME TO new_name; does not work immediately  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-bugs
Hello,

I don't know if this is expected behaviour or not, but I've found that
this sequence of commands does not work all the time:

ALTER TABLE name RENAME TO new_name;
ALTER TABLE new_name
  RENAME COLUMN x TO y;

It usually works with small work_mem and maintenance_work_mem values.
If I increase work_mem and maintenance_work_mem to 256MB it stops
working and prints following error message:

ERROR:  relation "new_name" does not exist

It doesn't matter whether the commands are run within the transaction
or not.

I'm running postgresql 8.3.3 on Core 2 Duo with 2GB ram. Actual table
has 700 000 rows. I think the issue might be timing related as I've
managed to "solve" the issue by putting SAVEPOINT between the commands
on one machine. But on other machine this did not help.

I think the issue might be reproducible by creating table with a lot
of rows, setting high work_mem and issuing the commands, but I did not
try to reproduce it this way.

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

Предыдущее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: BUG #4167: When generating UUID using UUID-OSSP module, UUIDs are not unique on Windows
Следующее
От: megous@gmail.com
Дата:
Сообщение: Re: ALTER TABLE name RENAME TO new_name; does not work immediately