Skip to content

Conversation

@TheOtherBrian1
Copy link
Contributor

@TheOtherBrian1 TheOtherBrian1 commented Jan 4, 2026

What kind of change does this PR introduce?

Feature

What is the current behavior?

Users cannot update the pg_vector settings:

  • hnsw.ef_search
  • ivfflat.probes
  • hnsw.iterative_scan
  • ivfflat.iterative_scan
  • hnsw.max_scan_tuples
  • hnsw.scan_mem_multiplier
  • ivfflat.max_probes
    at the ROLE level

What is the new behavior?

Allow users to change these values at the role level

Additional context

User asked to be granted these permissions:

Summary by CodeRabbit

  • Chores
    • Updated PostgreSQL privileged role configuration to enable two additional functionality option namespaces: hnsw.* and ivfflat.*. This preserves existing settings and ordering while expanding allowed configs for the privileged role.

✏️ Tip: You can customize this high-level summary in your review settings.

@TheOtherBrian1 TheOtherBrian1 requested review from a team as code owners January 4, 2026 17:22
@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

Walkthrough

Updated the PostgreSQL supautils configuration: supautils.privileged_role_allowed_configs now includes two additional wildcard entries, hnsw.* and ivfflat.*, and no other logic was changed. (≤50 words)

Changes

Cohort / File(s) Summary
PostgreSQL configuration
ansible/files/postgresql_config/supautils.conf.j2
Added hnsw.* and ivfflat.* to the privileged_role_allowed_configs list for supautils.privileged_role; no other edits.

Sequence Diagram(s)

(Skipped — change is a small config update that does not alter control flow or introduce multi-component interactions.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • soedirgo

Poem

🐰
I hopped through configs, quick and spry,
Added hnsw and ivfflat to try,
Wildcards flutter, settings play,
Vectors bound and leap away—
A tiny change, a joyful sigh!

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title references 'hsnw' settings but the actual change enables both 'hnsw' and 'ivfflat' prefixes via wildcards; it partially captures the intent but contains a typo and omits half of the affected settings.
Description check ✅ Passed The description provides comprehensive context including current/new behavior, specific settings affected, and a ticket reference, fulfilling the core informational requirements despite the template suggesting selection of sub-templates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbe44c4 and ed336e7.

📒 Files selected for processing (1)
  • ansible/files/postgresql_config/supautils.conf.j2
🔇 Additional comments (1)
ansible/files/postgresql_config/supautils.conf.j2 (1)

13-13: LGTM! Typo fixed and implementation verified.

The configuration correctly enables role-level access to pgvector parameters including hnsw.iterative_scan, ivfflat.iterative_scan, hnsw.max_scan_tuples, and ivfflat.max_probes. The hnsw.scan_mem_multiplier parameter is also properly included, which "specifies the max amount of memory to use, as a multiple of work_mem". The ivfflat.probes parameter is validated as well.

The past review correctly identified the typo "hsnw." which has now been fixed to "hnsw." (Hierarchical Navigable Small World). The wildcards hnsw.* and ivfflat.* will appropriately match all the pgvector configuration parameters mentioned in the PR objectives, allowing users to tune vector search performance at the role level.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acb688a and fbe44c4.

📒 Files selected for processing (1)
  • ansible/files/postgresql_config/supautils.conf.j2
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: run-check-harness-psql-orioledb-17 (aarch64-linux)
  • GitHub Check: run-check-harness-psql-15 (aarch64-linux)
  • GitHub Check: treefmt-check (aarch64-linux)
  • GitHub Check: run-check-harness-psql-17 (aarch64-linux)
  • GitHub Check: pre-commit-run (aarch64-linux)
  • GitHub Check: run-check-harness-psql-15 (aarch64-darwin)
  • GitHub Check: nix-shell (x86_64-linux)
  • GitHub Check: run-check-harness-psql-17 (x86_64-linux)
  • GitHub Check: run-check-harness-psql-15 (x86_64-linux)
  • GitHub Check: run-check-harness-psql-orioledb-17 (x86_64-linux)

Copy link
Collaborator

@samrose samrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need thorough review before merge

@soedirgo
Copy link
Member

soedirgo commented Jan 5, 2026

From the ticket:

I ran a few tests, both Supabase Postgres and a local installation of PG in a Linux environment. In both cases, I encountered the error:
unrecognized configuration parameter

I would've expected the error to be something along the lines of "permission denied to configure ..."; "unrecognized configuration parameter" seems to imply the library was not loaded at all. @pashkinelfe can you confirm if that's the case and if these configs are meant to be user-configurable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants