Skip to content

chore: bump localrecall for postgres per-connection timeouts#10517

Merged
mudler merged 2 commits into
masterfrom
chore/bump-localrecall-pg-timeouts
Jun 25, 2026
Merged

chore: bump localrecall for postgres per-connection timeouts#10517
mudler merged 2 commits into
masterfrom
chore/bump-localrecall-pg-timeouts

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Pulls mudler/LocalRecall#49.

A corrupt custom-index access method (observed: a BM25 index from pg_textsearch left inconsistent by a past pg_resetwal) can make an INSERT spin indefinitely on a BufferContent LWLock. The wedged backend holds its relation lock the whole time, so every later statement on that table queues behind it - one stuck insert stalls the entire vector store and saturates the connection pool, and is uninterruptible (only a Postgres restart clears it).

LocalRecall#49 sets safe per-connection timeouts on the pool:

  • lock_timeout=30s (default on) - the cascade-killer; queued statements fail fast instead of piling up.
  • idle_in_transaction_session_timeout=300s (default on).
  • statement_timeout opt-in via POSTGRES_STATEMENT_TIMEOUT; index builds are exempted so it's safe to enable.

go mod tidy clean, go build ./core/services/... (the agent-pool path that pulls localrecall transitively) green.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]

mudler added 2 commits June 25, 2026 22:44
Pulls mudler/LocalRecall#49: sets lock_timeout / idle_in_transaction
(default on) + opt-in statement_timeout on every pooled connection, so a
corrupt/wedged index (e.g. a BM25 insert spinning on a buffer-content lock)
can no longer hold its relation lock forever and head-of-line block the
whole vector store.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Note the POSTGRES_LOCK_TIMEOUT / POSTGRES_IDLE_IN_TRANSACTION_TIMEOUT /
POSTGRES_STATEMENT_TIMEOUT env vars read by the embedded vector store, and
that safe defaults are on automatically.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:claude-opus-4-8 [Claude Code]
@mudler mudler merged commit 179210b into master Jun 25, 2026
57 of 58 checks passed
@mudler mudler deleted the chore/bump-localrecall-pg-timeouts branch June 25, 2026 22:53
mudler added a commit that referenced this pull request Jun 25, 2026
#10517 pinned the pseudo-version of the postgres connection-timeout fix;
mudler/LocalRecall@v0.6.3 now tags that exact commit. Use the clean release
tag instead of the pseudo-version. No code change.


Assisted-by: Claude:claude-opus-4-8 [Claude Code]

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
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.

2 participants