Skip to content

Commit e04fc04

Browse files
author
Vladlen Popolitov
committed
Updated to the master version
2 parents 8199aed + d0dbc8b commit e04fc04

File tree

166 files changed

+4507
-3230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+4507
-3230
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ jobs:
88
fail-fast: false
99
matrix:
1010
include:
11+
- postgres: 18
12+
os: ubuntu-24.04
1113
- postgres: 17
12-
os: ubuntu-22.04
14+
os: ubuntu-24.04
1315
- postgres: 16
14-
os: ubuntu-22.04
16+
os: ubuntu-24.04
1517
- postgres: 15
1618
os: ubuntu-22.04
1719
- postgres: 14
@@ -87,13 +89,14 @@ jobs:
8789
postgres-version: 14
8890
- run: |
8991
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && ^
90-
cd %TEMP% && ^
9192
nmake /NOLOGO /F Makefile.win && ^
9293
nmake /NOLOGO /F Makefile.win install && ^
9394
nmake /NOLOGO /F Makefile.win installcheck && ^
9495
nmake /NOLOGO /F Makefile.win clean && ^
9596
nmake /NOLOGO /F Makefile.win uninstall
9697
shell: cmd
98+
- if: ${{ failure() }}
99+
run: cat regression.diffs
97100
i386:
98101
if: ${{ !startsWith(github.ref_name, 'mac') && !startsWith(github.ref_name, 'windows') }}
99102
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
1-
## 0.7.0 (unreleased)
1+
## 0.7.4 (2024-08-05)
2+
3+
- Fixed locking for parallel HNSW index builds
4+
- Fixed compilation error with GCC 14 on i386 when SSE2 is not enabled
5+
6+
## 0.7.3 (2024-07-22)
7+
8+
- Fixed `failed to add index item` error with `sparsevec`
9+
- Fixed compilation error with FreeBSD ARM
10+
- Fixed compilation warning with MSVC and Postgres 16
11+
12+
## 0.7.2 (2024-06-11)
13+
14+
- Fixed initialization fork for indexes on unlogged tables
15+
16+
## 0.7.1 (2024-06-03)
17+
18+
- Improved performance of on-disk HNSW index builds
19+
- Fixed `undefined symbol` error with GCC 8
20+
- Fixed compilation error with universal binaries on Mac
21+
- Fixed compilation warning with Clang < 14
22+
23+
## 0.7.0 (2024-04-29)
224

325
- Added `halfvec` type
426
- Added `sparsevec` type
527
- Added support for indexing `bit` type
28+
- Added support for indexing L1 distance with HNSW
629
- Added `binary_quantize` function
730
- Added `hamming_distance` function
831
- Added `jaccard_distance` function

META.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vector",
33
"abstract": "Open-source vector similarity search for Postgres",
44
"description": "Supports L2 distance, inner product, and cosine distance",
5-
"version": "0.6.2",
5+
"version": "0.7.4",
66
"maintainer": [
77
"Andrew Kane <andrew@ankane.org>"
88
],
@@ -20,7 +20,7 @@
2020
"vector": {
2121
"file": "sql/vector.sql",
2222
"docfile": "README.md",
23-
"version": "0.6.2",
23+
"version": "0.7.4",
2424
"abstract": "Open-source vector similarity search for Postgres"
2525
}
2626
},

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
EXTENSION = vector
2-
EXTVERSION = 0.6.2
2+
EXTVERSION = 0.7.4
33

44
MODULE_big = vector
5-
DATA = $(wildcard sql/*--*.sql)
6-
OBJS = src/bitvector.o src/halfutils.o src/halfvec.o src/hnsw.o src/hnswbuild.o src/hnswinsert.o src/hnswscan.o src/hnswutils.o src/hnswvacuum.o src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/sparsevec.o src/vector.o
5+
DATA = $(wildcard sql/*--*--*.sql)
6+
DATA_built = sql/$(EXTENSION)--$(EXTVERSION).sql
7+
OBJS = src/bitutils.o src/bitvec.o src/halfutils.o src/halfvec.o src/hnsw.o src/hnswbuild.o src/hnswinsert.o src/hnswscan.o src/hnswutils.o src/hnswvacuum.o src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/sparsevec.o src/vector.o
78
HEADERS = src/halfvec.h src/sparsevec.h src/vector.h
89

910
TESTS = $(wildcard test/sql/*.sql)
1011
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
1112
REGRESS_OPTS = --inputdir=test --load-extension=$(EXTENSION)
1213

14+
# To compile for portability, run: make OPTFLAGS=""
1315
OPTFLAGS = -march=native
1416

1517
# Mac ARM doesn't always support -march=native
@@ -41,8 +43,6 @@ all: sql/$(EXTENSION)--$(EXTVERSION).sql
4143
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
4244
cp $< $@
4345

44-
EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql
45-
4646
PG_CONFIG ?= pg_config
4747
PGXS := $(shell $(PG_CONFIG) --pgxs)
4848
include $(PGXS)
@@ -52,7 +52,7 @@ ifeq ($(PROVE),)
5252
PROVE = prove
5353
endif
5454

55-
# for Postgres 15
55+
# for Postgres < 15
5656
PROVE_FLAGS += -I ./test/perl
5757

5858
prove_installcheck:

Makefile.win

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
EXTENSION = vector
2-
EXTVERSION = 0.6.2
2+
EXTVERSION = 0.7.4
33

4-
OBJS = src\bitvector.obj src\halfutils.obj src\halfvec.obj src\hnsw.obj src\hnswbuild.obj src\hnswinsert.obj src\hnswscan.obj src\hnswutils.obj src\hnswvacuum.obj src\ivfbuild.obj src\ivfflat.obj src\ivfinsert.obj src\ivfkmeans.obj src\ivfscan.obj src\ivfutils.obj src\ivfvacuum.obj src\sparsevec.obj src\vector.obj
4+
DATA_built = sql\$(EXTENSION)--$(EXTVERSION).sql
5+
OBJS = src\bitutils.obj src\bitvec.obj src\halfutils.obj src\halfvec.obj src\hnsw.obj src\hnswbuild.obj src\hnswinsert.obj src\hnswscan.obj src\hnswutils.obj src\hnswvacuum.obj src\ivfbuild.obj src\ivfflat.obj src\ivfinsert.obj src\ivfkmeans.obj src\ivfscan.obj src\ivfutils.obj src\ivfvacuum.obj src\sparsevec.obj src\vector.obj
56
HEADERS = src\halfvec.h src\sparsevec.h src\vector.h
67

7-
REGRESS = bit_functions btree_halfvec btree_sparsevec btree_vector cast copy halfvec_functions halfvec_input hnsw_bit_hamming hnsw_bit_jaccard hnsw_halfvec_cosine hnsw_halfvec_ip hnsw_halfvec_l2 hnsw_options hnsw_sparsevec_cosine hnsw_sparsevec_ip hnsw_sparsevec_l2 hnsw_unlogged hnsw_vector_cosine hnsw_vector_ip hnsw_vector_l2 ivfflat_halfvec_cosine ivfflat_halfvec_ip ivfflat_halfvec_l2 ivfflat_options ivfflat_unlogged ivfflat_vector_cosine ivfflat_vector_ip ivfflat_vector_l2 sparsevec_functions sparsevec_input vector_functions vector_input
8+
REGRESS = bit btree cast copy halfvec hnsw_bit hnsw_halfvec hnsw_sparsevec hnsw_vector ivfflat_bit ivfflat_halfvec ivfflat_vector sparsevec vector_type
89
REGRESS_OPTS = --inputdir=test --load-extension=$(EXTENSION)
910

1011
# For /arch flags
@@ -19,11 +20,6 @@ PG_CFLAGS = $(PG_CFLAGS) $(OPTFLAGS) /O2 /fp:fast
1920
# https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/vectorizer-and-parallelizer-messages
2021
# PG_CFLAGS = $(PG_CFLAGS) /Qvec-report:2
2122

22-
all: sql\$(EXTENSION)--$(EXTVERSION).sql
23-
24-
sql\$(EXTENSION)--$(EXTVERSION).sql: sql\$(EXTENSION).sql
25-
copy sql\$(EXTENSION).sql $@
26-
2723
# TODO use pg_config
2824
!ifndef PGROOT
2925
!error PGROOT is not set
@@ -43,15 +39,18 @@ SHLIB = $(EXTENSION).dll
4339

4440
LIBS = "$(LIBDIR)\postgres.lib"
4541

42+
all: $(SHLIB) $(DATA_built)
43+
4644
.c.obj:
4745
$(CC) $(CFLAGS) /c $< /Fo$@
4846

4947
$(SHLIB): $(OBJS)
5048
$(CC) $(CFLAGS) $(OBJS) $(LIBS) /link /DLL /OUT:$(SHLIB)
5149

52-
all: $(SHLIB)
50+
sql\$(EXTENSION)--$(EXTVERSION).sql: sql\$(EXTENSION).sql
51+
copy sql\$(EXTENSION).sql $@
5352

54-
install:
53+
install: all
5554
copy $(SHLIB) "$(PKGLIBDIR)"
5655
copy $(EXTENSION).control "$(SHAREDIR)\extension"
5756
copy sql\$(EXTENSION)--*.sql "$(SHAREDIR)\extension"
@@ -70,6 +69,6 @@ uninstall:
7069

7170
clean:
7271
del /f $(SHLIB) $(EXTENSION).lib $(EXTENSION).exp
72+
del /f $(DATA_built)
7373
del /f $(OBJS)
74-
del /f sql\$(EXTENSION)--$(EXTVERSION).sql
7574
del /f /s /q results regression.diffs regression.out tmp_check tmp_check_iso log output_iso

0 commit comments

Comments
 (0)