AWS RDS Postgres giving error while setting “hnsw.ef_search” parameter on DB or User Level

0

Hello everyone,

I'm currently utilizing the pgvector extension for storing vector embeddings in a PostgreSQL database. Additionally, I've implemented the hnsw indexing algorithm for indexing these vectors. My goal is to set the ef_search parameter either at the user level or the database level. However, when I attempt to execute the SQL queries for this purpose, PostgreSQL returns an error stating “permission denied to set parameter 'hnsw.ef_search'”, even though I am using the postgres super-user account.

Here are the queries I've tried:

ALTER DATABASE mydb SET hnsw.ef_search = 500;

And

ALTER USER myuser SET hnsw.ef_search = 500;

Some additional information:

  1. Attempting to set a random named variable results in the error: “ERROR: unrecognized configuration parameter 'axax'”.
  2. Trying to set another valid variable, updates successfully at the database level.

Any insights or assistance on resolving this issue would be greatly appreciated.

Thank you.

質問済み 5ヶ月前252ビュー
1回答
0

Hi,

I don't think that you need the preliminary ALTER, hnsw.ef_search seems to be global

So, did you try SET hnsw.ef_search = 500; by itself?

Best,

Didier

profile pictureAWS
エキスパート
回答済み 5ヶ月前
  • Hello Thanks for reply.

    When I set hnsw.ef_search using SET hnsw.ef_search = 500, It set for that session only and when again connect to db I need to set it again.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ