Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8b18ed6

Browse files
committed
Doc: cover index CONCURRENTLY causing errors in INSERT ... ON CONFLICT.
Author: Mikhail Nikalayeu <mihailnikalayeu@gmail.com>Reviewed-by: Noah Misch <noah@leadboat.com>Discussion:https://postgr.es/m/CANtu0ojXmqjmEzp-=aJSxjsdE76iAsRgHBoK0QtYHimb_mEfsg@mail.gmail.comBackpatch-through: 13
1 parente7ccb24 commit8b18ed6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

‎doc/src/sgml/ref/insert.sgml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,15 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
594594
</para>
595595
</tip>
596596

597+
<warning>
598+
<para>
599+
While <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX
600+
CONCURRENTLY</command> is running on a unique index, <command>INSERT
601+
... ON CONFLICT</command> statements on the same table may unexpectedly
602+
fail with a unique violation.
603+
</para>
604+
</warning>
605+
597606
</refsect2>
598607
</refsect1>
599608

‎src/backend/optimizer/util/plancat.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,11 @@ find_relation_notnullatts(PlannerInfo *root, Oid relid)
789789
* the purposes of inference. If no opclass (or collation) is specified, then
790790
* all matching indexes (that may or may not match the default in terms of
791791
* each attribute opclass/collation) are used for inference.
792+
*
793+
* Note: during index CONCURRENTLY operations, different transactions may
794+
* reference different sets of arbiter indexes. This can lead to false unique
795+
* constraint violations that wouldn't occur during normal operations. For
796+
* more information, see insert.sgml.
792797
*/
793798
List*
794799
infer_arbiter_indexes(PlannerInfo*root)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp