Reclaim abandoned replication slots without waiting for restart

Offen
#41 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@yash-gadgil arbeitet bereits daran.

Seit 21.11.2026.

  • #42 von @yash-gadgil — offen

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
postgresql, rust
Bereich
databases

Rechercherichtung

Start by locating the startup slot-cleanup implementation and its tests, then trace where cleanup could run while the process is active. Check the supported PostgreSQL versions and available slot metadata, along with the STREAMGRES_SLOT_CLEANUP_AGE_MS configuration and its documentation. Done means safe cleanup is tested for stale and active slots across supported versions, with retention behavior documented.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

Replication slots left behind by a crashed process can continue holding WAL. Cleanup currently runs only at startup, only on PostgreSQL 17 (using inactive_since), and only when STREAMGRES_SLOT_CLEANUP_AGE_MS is configured.

Expected behavior

Abandoned slots should be identified and cleaned up reliably, including while the process is running, without relying solely on PostgreSQL 17-specific metadata.

Acceptance criteria

  • Slot cleanup can run after startup, not only during initialization.
  • The implementation handles supported PostgreSQL versions and their available slot metadata.
  • Cleanup age configuration has documented and tested behavior.
  • Active slots and slots that should be retained are never removed.
  • Tests cover stale slots, active slots, and supported PostgreSQL versions.
Vorherrschende Sprache
Rust
Sterne
129
Forks
7
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus juspay/streamgres

Alle Issues in juspay/streamgres

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.