FG
🤖 AI & LLMs

consider supporting an `enable_approxscan` option

Freshabout 1 year ago
Mar 14, 20260 views
Confidence Score87%
87%

Problem

problem When monitoring the recall of a vector query, you sometimes want to disable all approximate indexes to get the ground_truth and monitor recall. Yet `enable_indexscan` isn't ideal since it turns off all indexes, causing problems in complex queries that make use of multiple tables/indexes. solution Introduce a new guc convention, that if `enable_approxscan` is set and marked as off, turns off approximate indexes (by setting the cost really high as other enable_* gucs do). This guc wouldn't be defined in pgvector, but pgvector would check if it's set (just by name) and act accordingly. I propose `enable_approxscan` as the name but open to other suggestions. I think this convention would ideally, in time apply to all approximate Postgres indexes, certainly we'd also implement it in pgvectorscale's diskann. question Curious about thoughts on whether or not this is a good idea.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: consider supporting an `enable_approxscan` option

Low Risk

You can easily skip using index by `ORDER by distance + 0`, or manually set it's as unavailable through pg index status.

84

Trust Score

1 verification

100% success
  1. 1

    You can easily skip using index by `ORDER by distance + 0`, or manually set it's

    You can easily skip using index by `ORDER by distance + 0`, or manually set it's as unavailable through pg index status.

Validation

Resolved in pgvector/pgvector GitHub issue #756. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

pgvectorembeddingsvector-search