Re: "insert [...] on conflict" hangs on conflict on an unmentioned gist index
От | Tom Lane |
---|---|
Тема | Re: "insert [...] on conflict" hangs on conflict on an unmentioned gist index |
Дата | |
Msg-id | 1474.1467650281@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: "insert [...] on conflict" hangs on conflict on an unmentioned gist index (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: "insert [...] on conflict" hangs on conflict on an
unmentioned gist index
|
Список | pgsql-bugs |
I wrote: > It looks to me like the ON CONFLICT code has exactly zero chance of > working with non-btree (or more generally, non-amcanunique) indexes. Nah, I take that back --- I was expecting this to be handled somewhere else than it is. It looks like the actual cause is just sloppy handling of noDupErr in ExecInsertIndexTuples; the attached fixes it for me. regards, tom lane diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c index c819d19..e73bad3 100644 *** a/src/backend/executor/execIndexing.c --- b/src/backend/executor/execIndexing.c *************** ExecInsertIndexTuples(TupleTableSlot *sl *** 407,413 **** bool violationOK; CEOUC_WAIT_MODE waitMode; ! if (noDupErr) { violationOK = true; waitMode = CEOUC_LIVELOCK_PREVENTING_WAIT; --- 407,413 ---- bool violationOK; CEOUC_WAIT_MODE waitMode; ! if (noDupErr && (arbiterIndexes == NIL || arbiter)) { violationOK = true; waitMode = CEOUC_LIVELOCK_PREVENTING_WAIT;
В списке pgsql-bugs по дате отправления: