Skip to content

Commit 77ea3e4

Browse files
authored
Fit and finish before 0.5.0 release PR (#161)
Just to keep the actual deployment PR simpler, some fit and finish changes: * Updated README.md to cover L2 distance support * Tweaks to upgrade tests to (a) account for the possibility of upgrade from 0.4.0 on pg17, and (b) mark upgrade tests as serial to get us closer to allow running them all in one go. There is still an issue with pgrx dropping the test schema that needs to be fixed to get this actually working, but we can deal with that later.
1 parent 43e3f5e commit 77ea3e4

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ You can install pgvectorscale from source and install it in an existing PostgreS
7676
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
7777
## pgrx
7878
cargo install --locked cargo-pgrx
79-
cargo pgrx init --pg16 pg_config
79+
cargo pgrx init --pg17 pg_config
8080
8181
#download, build and install pgvectorscale
8282
cd /tmp
@@ -155,7 +155,7 @@ To enable pgvectorscale:
155155
1. Create a StreamingDiskANN index on the embedding column:
156156
```postgresql
157157
CREATE INDEX document_embedding_idx ON document_embedding
158-
USING diskann (embedding);
158+
USING diskann (embedding vector_cosine_ops);
159159
```
160160
1. Find the 10 closest embeddings using the index.
161161
@@ -166,12 +166,12 @@ To enable pgvectorscale:
166166
LIMIT 10
167167
```
168168
169-
Note: pgvectorscale currently support cosine distance (`<=>`) queries. If you would like additional distance types,
169+
Note: pgvectorscale currently supports: cosine distance (`<=>`) queries, for indices created with `vector_cosine_ops`; and L2 distance (`<->`) queries, for indices created with `vector_l2_ops`. This is the same syntax used by `pgvector`. If you would like additional distance types,
170170
[create an issue](https://github.com/timescale/pgvectorscale/issues).
171171
172172
## Tuning
173173
174-
The StreamingDiskANN index comes with **smart defaults** but also the ability to customize it's behavior. There are two types of parameters: index build-time parameters that are specified when an index is created and query-time parameters that can be tuned when querying an index.
174+
The StreamingDiskANN index comes with **smart defaults** but also the ability to customize its behavior. There are two types of parameters: index build-time parameters that are specified when an index is created and query-time parameters that can be tuned when querying an index.
175175
176176
We suggest setting the index build-time paramers for major changes to index operations while query-time parameters can be used to tune the accuracy/performance tradeoff for individual queries.
177177

pgvectorscale/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ simdeez = { version = "1.0.8" }
2727
rand = { version = "0.8", features = ["small_rng"] }
2828
pgvectorscale_derive = { path = "pgvectorscale_derive" }
2929
semver = "1.0.22"
30+
serial_test = "3.2.0"
3031
once_cell = "1.20.1"
3132

3233
[dev-dependencies]

pgvectorscale/src/access_method/upgrade_test.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#[pgrx::pg_schema]
33
pub mod tests {
44
use pgrx::*;
5+
use serial_test::serial;
56
use std::{fs, path::Path, process::Stdio};
67

78
fn copy_dir_all(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> std::io::Result<()> {
@@ -28,8 +29,8 @@ pub mod tests {
2829
extname: &str,
2930
amname: &str,
3031
) {
31-
if cfg!(feature = "pg17") {
32-
// PG17 is only supported for one version
32+
if cfg!(feature = "pg17") && version != "0.4.0" {
33+
// PG17 was not supported before 0.4.0
3334
return;
3435
}
3536
pgrx_tests::run_test(
@@ -224,6 +225,7 @@ pub mod tests {
224225
}
225226

226227
#[ignore]
228+
#[serial]
227229
#[test]
228230
fn test_upgrade_from_0_0_2() {
229231
test_upgrade_base(
@@ -236,18 +238,21 @@ pub mod tests {
236238
}
237239

238240
#[ignore]
241+
#[serial]
239242
#[test]
240243
fn test_upgrade_from_0_2_0() {
241244
test_upgrade_base("0.2.0", "0.11.4", "pgvectorscale", "vectorscale", "diskann");
242245
}
243246

244247
#[ignore]
248+
#[serial]
245249
#[test]
246250
fn test_upgrade_from_0_3_0() {
247251
test_upgrade_base("0.3.0", "0.11.4", "pgvectorscale", "vectorscale", "diskann");
248252
}
249253

250254
#[ignore]
255+
#[serial]
251256
#[test]
252257
fn test_upgrade_from_0_4_0() {
253258
test_upgrade_base("0.4.0", "0.12.5", "pgvectorscale", "vectorscale", "diskann");

0 commit comments

Comments
 (0)