Re: Is it safe to rename an index through pg_class update? - Mailing list pgsql-general

From Andres Freund
Subject Re: Is it safe to rename an index through pg_class update?
Date
Msg-id 20200306173805.4yznqcchzojzk7dl@alap3.anarazel.de
Whole thread Raw
In response to Re: Is it safe to rename an index through pg_class update?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Is it safe to rename an index through pg_class update?  (Kouber Saparev <kouber@gmail.com>)
List pgsql-general
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.

Greetings,

Andres Freund



pgsql-general by date:

Previous
From: Andrew Kerber
Date:
Subject: Re: Real application clustering in postgres.
Next
From: Jeremy Schneider
Date:
Subject: Re: Real application clustering in postgres.