diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index 1aa7a7ecbac..1c358b984ae 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -556,6 +556,15 @@ INSERT INTO table_name [ AS
+
+
+ While CREATE INDEX CONCURRENTLY or REINDEX
+ CONCURRENTLY is running on a unique index, INSERT
+ ... ON CONFLICT statements on the same table may unexpectedly
+ fail with a unique violation.
+
+
+
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index 3b1ada1127e..47169e81d12 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -627,6 +627,11 @@ get_relation_foreign_keys(PlannerInfo *root, RelOptInfo *rel,
* the purposes of inference. If no opclass (or collation) is specified, then
* all matching indexes (that may or may not match the default in terms of
* each attribute opclass/collation) are used for inference.
+ *
+ * Note: during index CONCURRENTLY operations, different transactions may
+ * reference different sets of arbiter indexes. This can lead to false unique
+ * constraint violations that wouldn't occur during normal operations. For
+ * more information, see insert.sgml.
*/
List *
infer_arbiter_indexes(PlannerInfo *root)