Re:BUG #18371: There are wrong constraint residues when detach hash partiton concurrently

Поиск
Список
Период
Сортировка
От feichanghong
Тема Re:BUG #18371: There are wrong constraint residues when detach hash partiton concurrently
Дата
Msg-id tencent_4DA59E77900C87CEBA0F0213000E64040D07@qq.com
обсуждение исходный текст
Ответ на BUG #18371: There are wrong constraint residues when detach hash partiton concurrently  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18371: There are wrong constraint residues when detach hash partiton concurrently  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs

> This can work normally on range partitions. However, the constraint on hash
> partitions uses satisfies_hash_partition with the OID of the parent table, and
> the newly created constraint does not take effect. For example, in the following
> case, although there is a t_p1_a_check constraint on t_p1, it is still possible
> to perform an insert:
What I said here is wrong, the constraints on the hash partition will also take
effect. But this constraint depends on the oid of the parent partition.

> Based on the analysis above, should the added constraint for a hash partition
> be dropped after detachment?
I have initially implemented this logic in the attached patch and added a
testcase. I really hope that developers can give me some suggestions.


Best Regards,
Fei Changhong
Alibaba Cloud Computing Ltd.
 
Вложения

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: `order by random()` makes select-list `random()` invocations deterministic
Следующее
От: Tender Wang
Дата:
Сообщение: Re: BUG #18314: PARALLEL UNSAFE function does not prevent parallel index build