Skip to content

Commit a329cda

Browse files
committed
Only try to parallel build for SBQ storage
1 parent f3794f6 commit a329cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pgvectorscale/src/access_method/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub extern "C" fn ambuild(
284284
meta_page.store(&index_relation, false);
285285
};
286286

287-
let workers = if cfg!(feature = "build_parallel") && !meta_page.has_labels() {
287+
let workers = if cfg!(feature = "build_parallel") && !meta_page.has_labels() && meta_page.get_storage_type() == StorageType::SbqCompression {
288288
// Only use parallel building if we have enough vectors to justify it
289289
let heap_tuples = unsafe { heap_relation.rd_rel.as_ref().unwrap().reltuples as usize };
290290
if heap_tuples >= MIN_VECTORS_FOR_PARALLEL_BUILD {

0 commit comments

Comments
 (0)