📜  重复的键值违反了唯一约束“pg_type_typname_nsp_index” - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:04.002000             🧑  作者: Mango

代码示例1
I was reading this. It seems this error rises when you are creating/updating the same table with parallel processing. I understand it depends because of this (as explained on the google group discussion).

So I think it depend from PostgreSQL itself and not from the connection driver or the module used for the multiprocessing.

Well, Actually, the only way I found to solve this is to create chunks big enough to have back a writing process slower than the calculation itself. With bigger chunks this error doesn't rise.