PostgreSQL 18.6+ requires `svs` in `output_plugin_libraries`, but this isn't documented or checked

Open
#107 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c, postgresql

Research direction

Start with docs/build_guide/README.md, docs/USER_GUIDE.md, the README Quick Start, upgrade docs, and vamanalauncher.c; trace the worker’s decoding failure to where the CREATE INDEX warning is produced. Check how the existing wal_level startup validation works and how PostgreSQL exposes output_plugin_libraries. Done means documenting the PostgreSQL 18.6+ requirement and upgrade caveat, checking the setting at startup and on reload failures, and giving users an actionable warning.

Written by the indexing model from the issue text.

Description

Summary

From PostgreSQL 18.6 onwards, the extension needs one more server setting before it works correctly:

output_plugin_libraries = 'pgoutput, test_decoding, svs'

This applies to every installation on 18.6 or later, fresh initdb included. Without the setting, vamana indexes build but do not work properly (see below). Neither the documented required settings nor the extension's startup checks mention it, so a user who follows the build guide exactly on 18.6 gets a broken install.

Background

PostgreSQL 18.6 (CVE-2026-6471; the same change also went into the matching minor releases of 14–17) adds the parameter output_plugin_libraries. Logical decoding may use only the libraries it lists. The default, 'pgoutput, test_decoding', excludes svs. The vamana worker uses svs.so as a logical decoding output plugin to track changes to each index, so on a default 18.6 configuration that change tracking is refused.

What happens without the setting

Tested on a freshly initialized 18.6 cluster, configured per docs/build_guide/README.md → "Required PostgreSQL settings":

  1. CREATE INDEX ... USING vamana succeeds, but warns:

    WARNING:  vamana worker load failed: library "svs" may not be used as an output plugin
    WARNING:  vamana index "smoke_idx": background worker load failed; index will be loaded on its next access
    
  2. On every server restart, each vamana index is rebuilt from the table instead of being loaded from disk:

    LOG:  vamana index 17208 loaded from disk (1000000 vectors, capacity 1000000)
    LOG:  vamana index 17208: replication slot never reached consistency; rebuilding from the heap instead of replaying from the slot
    
  3. Queries issued while that rebuild runs fail. At 1M × 768D the rebuild takes minutes:

    ERROR:  vamana background worker unavailable after 5000 ms
    

The warning in step 1 does not name output_plugin_libraries, and nothing points the user to the cause. Small test indexes rebuild fast enough that the problem is easy to miss.

With the setting

On the same server, after a fresh initdb with the setting added:

  • The index's change tracking starts right after CREATE INDEX (logical decoding found consistent point).
  • After a restart, indexes load from disk with no rebuild. This was checked at both 5k rows and 1M × 768D, with LeanVec tuning and search completing normally.

The same configuration on 18.1, without the setting, works as before.

Environment

  • SVS-Extension-for-PostgreSQL v0.1.0, commit 033cd2c (2026-10-28)
  • PostgreSQL 18.6 (fails without the setting); 18.1 (works, setting does not exist)
  • shared_preload_libraries = 'vector,svs', wal_level = logical
  • Intel Xeon 6975P-C, 16 vCPU, 123 GiB RAM

Steps to reproduce

  1. initdb a PostgreSQL 18.6 cluster and apply the required settings from the build guide. Leave output_plugin_libraries at its default.

  2. Enroll a database, then:

    CREATE TABLE smoke_t (id bigint PRIMARY KEY, embedding vector(64));
    INSERT INTO smoke_t
      SELECT g, (SELECT array_agg(random())::vector(64) FROM generate_series(1,64) WHERE g > 0)
      FROM generate_series(1,5000) g;
    CREATE INDEX smoke_idx ON smoke_t USING vamana (embedding vector_l2_ops);
    

    The output plugin warning appears.

  3. Restart the server and query the index. The log shows the index being rebuilt from the table.

  4. Add svs to output_plugin_libraries, then repeat from a fresh cluster. No warning appears, and the index loads from disk after the restart.

Requested changes

  1. Add the setting to the required configuration in docs/build_guide/README.md ("Required PostgreSQL settings"), the README Quick Start, and docs/USER_GUIDE.md (next to wal_level). Mark it as required on PostgreSQL 18.6 and later. Also include the release notes' caution that every listed library becomes usable as an output plugin by all REPLICATION users.
  2. Enforce it like wal_level. vamanalauncher.c already stops at startup with a clear message when wal_level < logical. Add the same kind of check when the server has output_plugin_libraries and svs is not listed in it. The check can test whether the parameter exists, for example with GetConfigOption(..., missing_ok = true), rather than comparing version numbers. The parameter can change on reload, so the worker should also report a clear error that names the parameter if decoding is refused.
  3. Make the CREATE INDEX warning actionable. Include a hint to add svs to output_plugin_libraries.
  4. Note for upgrades: pg_upgrade --check to 18.6+ fails on clusters with existing vamana indexes unless the new cluster already lists svs. The upgrade docs should say so.
Dominant language
Perl
Stars
3
Forks
3
Avg merge
4d 19h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intel/SVS-Extension-for-PostgreSQL

All issues in intel/SVS-Extension-for-PostgreSQL

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.