Re: Is it safe to rename an index through pg_class update?

Поиск
Список
Период
Сортировка
От Kouber Saparev
Тема Re: Is it safe to rename an index through pg_class update?
Дата
Msg-id CAN4RuQsnrYKWGQyxTsc2YB+88wBhGugMeX3nQgtVH5_hx6LmBg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is it safe to rename an index through pg_class update?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Is it safe to rename an index through pg_class update?
Список pgsql-general
На пт, 6.03.2020 г. в 21:00 Andres Freund <andres@anarazel.de> написа:
Hi,

On 2020-02-27 10:52:36 -0500, Tom Lane wrote:
> FWIW, I can't immediately think of a reason this would cause a problem,
> at least not on 9.4 and up which use MVCC catalog scans.  If you're
> really still on 9.3 then it's notably more risky.  In any case, I've
> not had any caffeine yet today, so this doesn't count for much.

It likely could cause some problems if somebody concurrently executed
DDL affecting the same table. At least some "concurrently updated"
errors, and perhaps some worse ones.  I'd at least add an explicit LOCK
TABLE on the underlying table that prevents concurrent catalog
modifications.

I am trying to escape the Access Exclusive lock over the table indeed, otherwise I would use the ALTER statement instead anyway, which makes a lock implicitly. Thanks for the responses. There is nobody else doing DDLs except me - Mr. DBA, so I guess I am safe on this side. ;)

Cheers,
--
Kouber Saparev

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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Real application clustering in postgres.
Следующее
От: "Zwettler Markus (OIZ)"
Дата:
Сообщение: gdal version for Postgis 2.4?