Re: Errors creating partitioned tables from existing using (LIKE) after renaming table constraints Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Errors creating partitioned tables from existing using (LIKE) after renaming table constraints
Дата
Msg-id 20181216072703.GK5012@paquier.xyz
обсуждение исходный текст
Ответ на Re: Errors creating partitioned tables from existing using (LIKE) after renaming table constraints  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: Errors creating partitioned tables from existing using (LIKE) after renaming table constraints  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-bugs
On Fri, Dec 14, 2018 at 11:19:16AM +0900, Amit Langote wrote:
> Thank you for looking.  I noticed that the previously posted patch doesn't
> apply as is to branches before 11, so here are the patches that apply to
> 9.4 to 10 branches.

When renaming an attribute, renameatt_internal is in charge of
invalidating the cache by using CacheInvalidateHeapTuple when running
the catalog update in CatalogTupleUpdate.

For constraint renames, we may finish by using RenameConstraintById or
RenameRelationInternal.  And here the constraint is removed by OID where
a invalidation happens for the constraint, but not its parent relation.
In short I agree with your fix and its position, still I think that we
should add a comment why the invalidation needs to happen, with
something simple, like "Invalidate relcache so as others can see the new
constraint name".

I'll try to get that committed tomorrow and back-patched appropriately.
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #15548: Unaccent does not remove combining diacritical characters
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Errors creating partitioned tables from existing using (LIKE) after renaming table constraints