Sync from SUSE:SLFO:Main pgvector revision 05c534ca128de7103e5c356075dd34a5

This commit is contained in:
2025-05-28 11:20:40 +02:00
commit 4b87dbb981
6 changed files with 223 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

7
_multibuild Normal file
View File

@@ -0,0 +1,7 @@
<multibuild>
<package>postgresql13</package>
<package>postgresql14</package>
<package>postgresql15</package>
<package>postgresql16</package>
<package>postgresql17</package>
</multibuild>

BIN
pgvector-0.8.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

72
pgvector.changes Normal file
View File

@@ -0,0 +1,72 @@
-------------------------------------------------------------------
Fri Jan 24 15:07:12 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to avoid compile-time CPU-detection (boo#1100677)
-------------------------------------------------------------------
Fri Jan 24 14:10:44 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- set OPTFLAGS on the cmdline on the make cmdline to overwrite the
-march=native flag i the make file. %{optflags} is passed via the
pgxs handling and taken from postgresql (boo#1236351)
-------------------------------------------------------------------
Sat Jan 18 10:31:56 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- split out a devel package with the header files to build
extensions on top of pgvector (gh:pgvector/pgvector#759)
-------------------------------------------------------------------
Thu Jan 9 08:20:42 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- Update to 0.8.0
- Added support for iterative index scans
- Added casts for arrays to sparsevec
- Improved cost estimation for better index selection when
filtering
- Improved performance of HNSW index scans
- Improved performance of HNSW inserts and on-disk index builds
- Dropped support for Postgres 12
-------------------------------------------------------------------
Sat Sep 28 00:18:40 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- enable pg17
-------------------------------------------------------------------
Wed Sep 4 13:35:00 UTC 2024 - Johannes Weberhofer <jweberhofer@weberhofer.at>
- Update to 0.7.4
* Fixed locking for parallel HNSW index builds
* Fixed compilation error with GCC 14 on i386 when SSE2 is not enabled
- Update to 0.7.3
* Fixed failed to add index item error with sparsevec
* Fixed compilation error with FreeBSD ARM
* Fixed compilation warning with MSVC and Postgres 16
- Update to 0.7.2
* Fixed initialization fork for indexes on unlogged tables
- Update to 0.7.1
* Improved performance of on-disk HNSW index builds
* Fixed undefined symbol error with GCC 8
* Fixed compilation warning with Clang < 14
- Fixed download URL
-------------------------------------------------------------------
Tue May 7 23:32:12 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to 0.7.0
no changelog provided
-------------------------------------------------------------------
Thu Sep 28 20:54:14 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
- enable pg 16
-------------------------------------------------------------------
Mon Sep 4 23:59:12 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
- initial package

87
pgvector.spec Normal file
View File

@@ -0,0 +1,87 @@
#
# spec file for package pgvector
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pg_name @BUILD_FLAVOR@%{nil}
%define ext_name pgvector
%if "%{pg_name}" == ""
%global main_build 1
%else
%global main_build 0
%{pg_version_from_name}
%endif
%if %{main_build}
Name: %{ext_name}
BuildRequires: postgresql-server-devel
%else
Name: %{pg_name}-%{ext_name}
BuildRequires: %{pg_name}-server-devel
%pg_server_requires
%endif
Version: 0.8.0
Release: 0
Summary: Open-source vector similarity search for Postgres
License: PostgreSQL
Group: Productivity/Databases/Tools
URL: https://github.com/pgvector/pgvector
Source: https://github.com/pgvector/%{ext_name}/archive/refs/tags/v%{version}.tar.gz#/%{ext_name}-%{version}.tar.gz
Patch0: https://github.com/pgvector/pgvector/pull/764.patch#/reproducible.patch
%description
Store your vectors with the rest of your data. Supports:
exact and approximate nearest neighbor search
L2 distance, inner product, and cosine distance
any language with a Postgres client
Plus ACID compliance, point-in-time recovery, JOINs, and all of the other great features of Postgres
%package devel
Summary: Development files for pgvector
%description devel
This package holds the development files to build other extensions to support pgvector.
%prep
%autosetup -p1 -n %{ext_name}-%{version}
%build
%make_pgxs
%install
%make_install
%if %{main_build}
rm -rv %{buildroot}%{pg_config_pkglibdir}/vector* %{buildroot}%{pg_config_sharedir}/extension/vector*
%else
rm -rv %{buildroot}%{pg_config_pkgincludedir}/server/extension/vector/
%endif
%if %{main_build}
%files devel
%{pg_config_pkgincludedir}/server/extension/vector/
%else
%files
%license LICENSE
%doc README.md CHANGELOG.md
%{pg_config_pkglibdir}/vector*.so
%{pg_config_sharedir}/extension/vector*
%endif
%changelog

31
reproducible.patch Normal file
View File

@@ -0,0 +1,31 @@
From a2c6813aa0cfca83d6de93aad61a0e2cae084aee Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Fri, 24 Jan 2025 04:10:21 +0100
Subject: [PATCH] Avoid -march=native when reproducible build is wanted
See https://reproducible-builds.org/ for why this is good.
Without this patch, compiling on different machines produced different binaries, which made verification of results difficult.
This patch was done while working on reproducible builds for openSUSE.
---
Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 7a4b88ca..4681d0f7 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,11 @@ REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test --load-extension=$(EXTENSION)
# To compile for portability, run: make OPTFLAGS=""
-OPTFLAGS = -march=native
+ifdef SOURCE_DATE_EPOCH
+ OPTFLAGS =
+else
+ OPTFLAGS = -march=native
+endif
# Mac ARM doesn't always support -march=native
ifeq ($(shell uname -s), Darwin)