Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`XX000: ResourceOwnerForget called for buffer pin after release started` during vchordrq scan on halfvec

Open
#463 3 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
Mostly clear
Activity status
Active
Tech stack
postgresql, rust
Domain
backend, databases

Research direction

Reproduce concurrent vchordrq scans on halfvec(1024) with rerank_in_table=true and the reported index settings. Start with PostgreSQL's resowner.c at line 572 and the vchord scan path; determine why a buffer pin is forgotten after release begins. Done means the transient XX000 error no longer occurs under concurrent load and a regression test covers it.

Written by the indexing model from the issue text.

Description

Extension versions:

  • vchord 1.1.1 (latest)
  • vector (pgvector) 0.8.1
  • PostgreSQL PostgreSQL 18.2 (Debian 18.2-1.pgdg12+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14+deb12u1) 12.2.0, 64-bit

Error:
Npgsql.PostgresException: XX000: ResourceOwnerForget called for buffer pin after release started
at resowner.c:572, Routine: ResourceOwnerForget

Setup:

  • Column type: halfvec(1024)
  • Index: vchordrq (MaxInnerProduct / <#> operator)
  • rerank_in_table = true
CREATE INDEX ix_massima_indexes_embedding
    ON massima_indexes
    USING vchordrq (embedding halfvec_ip_ops)
    WITH (
        epsilon = 0.8,
        probes = '480,960',
        options = $$
residual_quantization = false
rerank_in_table = true
build.pin = true

[build.internal]
lists = [8000, 16000]
spherical_centroids = true
build_threads = 8
$$
    );

Trigger: Occurs transiently under concurrent query load.

Workaround: Retrying the query on a fresh connection succeeds 100% of the time.

Stack trace:

An exception occurred while iterating over the results of a query for context type '"Nomos.Judgments.Data.JudgmentDbContext"'."
""Npgsql.PostgresException (0x80004005): XX000: ResourceOwnerForget called for buffer pin after release started
   at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at Npgsql.NpgsqlDataReader.Read(Boolean async, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.BufferedDataRecord.InitializeAsync(DbDataReader reader, IReadOnlyList`1 columns, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList`1 columns, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList`1 columns, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass30_0`2.b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
  Exception data:
    Severity: ERROR
    SqlState: XX000
    MessageText: ResourceOwnerForget called for buffer pin after release started
    File: resowner.c
    Line: 572
    Routine: ResourceOwnerForget"
Dominant language
Rust
Stars
1.8k
Forks
72
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 supervc-stack/VectorChord

All issues in supervc-stack/VectorChord

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.