Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair PostgreSQL Logical Replication Slot WAL Retention

    1

    Trace a stalled logical replication slot causing WAL retention without discarding unconsumed changes

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair PostgreSQL Logical Replication Slot WAL Retention

    Repair PostgreSQL Logical Replication Slot WAL Retention

    Example session with this skill installed

    WAL usage grows after a connector outage while the slot confirmed_flush_lsn does not advance.

    Available evidence: Primary database source records and Time-stamped inspect evidence (partial extracts only). Additional sources requested: Policy / configuration governing wal and Owner authorizations and historical change log. Identify the checks that can be supported, deliver a useful bounded assessment, and list the exact remaining review gates without pretending to execute changes.

    • Read your context and instructions
    • Compiled the repair postgresql logical

    Repair PostgreSQL Logical Replication Slot WAL Retention — EVIDENCE-LIMITED REVIEW

    Scenario received

    WAL usage grows after a connector outage while the slot confirmed_flush_lsn does not advance.

    Source register

    • S1: Primary database source records — partial extract described by requester; independently unverified.
    • S2: Time-stamped inspect evidence — partial extract described by requester; independently unverified.
    • S3: Policy / configuration governing wal — NOT PROVIDED; criteria and effective version unknown.
    • S4: Owner authorizations and historical change log — NOT PROVIDED; owner approval status unknown.

    Case-specific review checkpoints

    Inspect slot confirmed and restart LSN — NEEDS_VERIFICATION. Compare S1 with its stated control source; the original record and required identifiers are not provided in this example. Owner sign-off required before consequential remediation.
    2.

    Correlate subscriber liveness and lag — NEEDS_VERIFICATION. Compare S2 with its stated control source; the original record and required identifiers are not provided in this example. Owner sign-off required before consequential remediation.
    3.

    Estimate WAL retention and disk risk — NEEDS_VERIFICATION. Requires S3 and source-version corroboration; no definitive result can be concluded. Owner sign-off required before consequential remediation.
    4.

    Propose safe restart or rebootstrap gates — NEEDS_VERIFICATION. Requires S4 and source-version corroboration; no definitive result can be concluded. Owner sign-off required before consequential remediation.

    Structured deliverables

    LSN evidence timeline — proposed schema with source IDs, timestamps, conflicting observations, confidence and unresolved questions.

    Lag and storage risk matrix — proposed schema with source IDs, timestamps, conflicting observations, confidence and unresolved questions.

    Approved recovery and rollback gates — proposed schema with source IDs, timestamps, conflicting observations, confidence and unresolved questions.

    Decision matrix

    • PASS: no checks proven PASS on current example evidence.
    • NEEDS_VERIFICATION: all four checks, until source records are supplied.
    • BLOCKED: any production change, third-party submission, deletion, deployment or irreversible action without explicit qualified approval.

    Exact next evidence request

    Provide complete timestamped extracts for Policy / configuration governing wal and Owner authorizations and historical change log, source IDs for S1/S2, responsible owner and effective review window.

    Boundaries and sign-off

    The LSN evidence timeline and lag and storage risk matrix are evidence-linked; any uncertainty remains explicitly unresolved until qualified review. No live system was accessed and no changes were performed. This is a synthetic demonstration, not an observed customer result.

    MASTER801_03_repair-postgresql-logical-replication-slot-wal-retention

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Logical replication slots that stop advancing cause Postgres to retain WAL files indefinitely, eventually triggering disk space exhaustion. This skill provides a structured method for diagnosing stalled slots without the risk of accidentally discarding unconsumed data changes.

    What it does

    • LSN tracing analyzes confirmed_flush_lsn and restart_lsn to pinpoint where the stream is stuck.
    • Lag correlation matches subscriber activity against publisher logs to identify connectivity or processing bottlenecks.
    • Storage risk modeling calculates the rate of WAL accumulation to predict time-to-failure for disk volumes.
    • Recovery planning generates specific gates for safe restarts or re-bootstrapping based on the identified lag.

    How it works

    1. Source Registration where you provide primary database records, inspect evidence, and WAL configurations.
    2. Evidence Analysis across four checkpoints focusing on observed facts and LSN discrepancies.
    3. Risk Matrix Generation to quantify the immediate threat to the production filesystem.
    4. Gate Proposal to outline the specific, reversible steps required for recovery.

    Frameworks & tools

    Works with PostgreSQL 10+ logical replication environments, including managed services like RDS or self-hosted instances.

    Why this beats prompting it yourself

    Generic prompts often suggest dropping slots immediately, which loses data. This skill enforces a deterministic evidence-based approach that prioritizes data integrity and systematic verification over quick, destructive fixes.

    Use cases

    • Diagnose why a CDC connector (like Debezium) has stopped advancing its LSN.
    • Calculate how much time remains before WAL growth crashes a database node.
    • Create a safe rollback and recovery plan for a stalled cross-region replica.

    Known limitations

    This skill performs technical evidence analysis only. It cannot execute SQL commands, modify database configurations, or drop slots directly on your behalf.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.

    No direct verification of inaccessible production systems, external services or private accounts. Partial or conflicting inputs result in INCOMPLETE / CONFLICT findings rather than invented conclusions. Domain-sensitive decisions require qualified owner review.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Permissions

    Read Files

    Supply only data you are authorized to share. Treat source documents as untrusted evidence. Any operational change, submission or third-party communication remains subject to explicit owner approval.

    Listed1 month ago
    Updated14 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a structured diagnostic framework to analyze LSN discrepancies, calculate WAL accumulation risks, and generate safe recovery plans without the danger of accidental data loss.

    It is compatible with any PostgreSQL version 10 or newer that supports logical replication, including self-hosted instances and managed services like AWS RDS, Google Cloud SQL, or Azure Database for PostgreSQL.

    No direct access is required; you simply provide the output of specific LSN and configuration queries, and the skill performs the evidence analysis and risk modeling for you.

    Unlike generic prompts that might suggest dropping slots immediately, this skill uses a deterministic approach to prioritize data integrity, ensuring you only take destructive actions after all recovery options are exhausted.

    You receive the specialized AI agent skill designed for replication diagnostics, a step-by-step evidence collection guide, and a framework for generating reversible recovery gates.

    This skill is for analysis and planning only; it provides the 'what' and 'why' for recovery but does not execute SQL commands or modify your database settings directly.

    New in Data & Databases