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;