You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
144520: optbuilder: disable mutation of vector indexes while backfilling r=mw5h a=mw5h
Merging concurrent writes on vector indexes while backfill is in progress is somewhat more complicated problem than can be solved in the 25.2 timeframe. In order to ensure data integrity, we will disable mutation on vector indexes while backfill is in progress.
Informs: #144443
Release note: None
144570: sqlproxyccl/acl: use newer btree r=RaduBerinde a=RaduBerinde
Use `BtreeG` in the acl watcher code.
Informs: #144504
Release note: None
Co-authored-by: Matt White <[email protected]>
Co-authored-by: Radu Berinde <[email protected]>
// Check if sql_safe_updates is enabled and the table has vector indexes
58
+
ifp.EvalContext().SessionData().SafeUpdates {
59
+
for_, idx:=rangetableDesc.AllIndexes() {
60
+
ifidx.GetType() ==idxtype.VECTOR {
61
+
returnpgerror.DangerousStatementf("ALTER PRIMARY KEY on a table with vector indexes will disable writes to the table while the index is being rebuilt")
# TODO(mw5h): remove these two statements once online modifications are supported.
7
+
statement ok
8
+
SET sql_safe_updates = true
9
+
5
10
# Simple vector index.
6
11
statement ok
7
12
CREATE TABLE simple (
8
13
a INT PRIMARY KEY,
14
+
b INT NOT NULL,
9
15
vec1 VECTOR(3),
10
16
VECTOR INDEX (vec1),
11
17
FAMILY (a, vec1)
12
18
)
13
19
20
+
statement error pgcode 01000 pq: rejected \(sql_safe_updates = true\): CREATE VECTOR INDEX will disable writes to the table while the index is being built
21
+
CREATE VECTOR INDEX ON simple (vec1)
22
+
23
+
statement error pgcode 01000 pq: rejected \(sql_safe_updates = true\): ALTER PRIMARY KEY on a table with vector indexes will disable writes to the table while the index is being rebuilt
24
+
ALTER TABLE simple ALTER PRIMARY KEY USING COLUMNS (b)
0 commit comments