Hello everybody,

Renaming an index the classical way through "ALTER INDEX xxx RENAME TO yyy"
needs an AccessExclusiveLock over the table holding the index (at least on
9.3 it does). Instead, couldn't I simply:

UPDATE pg_class SET relname = 'yyy' WHERE oid = 'xxx'::regclass;

Are there any risks to corrupt the database or to lose concurrent
transactions? I tried to make some tests with parallel queries and locks
over the table, but I did not discover anything special.

--
Kouber Saparev

Reply via email to