More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair PostgreSQL Partition Retention Detach Lock Contention

    1

    Separate partition retention jobs from long transactions that block DETACH operations

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair PostgreSQL Partition Retention Detach Lock Contention

    Repair PostgreSQL Partition Retention Detach Lock Contention

    Example session with this skill installed

    A monthly retention task waits on lock after a report pins an old partition.

    Available sources: partition parent catalog, active lock snapshot (partial excerpts only). Additional evidence requested: retention job log, reporting transaction history. Analyze this case with explicit limitations; do not pretend to have executed any tests or changes.

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

    Repair PostgreSQL Partition Retention Detach Lock Contention — EVIDENCE-LIMITED REVIEW

    Scenario received

    A monthly retention task waits on lock after a report pins an old partition.

    Source register

    • S1: partition parent catalog — partial extract available.
    • S2: active lock snapshot — partial extract available.
    • S3: retention job log — NOT PROVIDED; REQUIRED FOR VERIFICATION.
    • S4: reporting transaction history — NOT PROVIDED; REQUIRED FOR VERIFICATION.

    Concrete findings and verification

    match blocked detach to exact lock holders — NEEDS VERIFICATION against supplied source excerpts and missing evidence.
    2. test concurrent detach prerequisites — NEEDS VERIFICATION against supplied source excerpts and missing evidence.
    3. reconcile retention safety window — NEEDS VERIFICATION against supplied source excerpts and missing evidence.
    4.

    design maintenance and rollback checks — NEEDS VERIFICATION against supplied source excerpts and missing evidence.

    Deliverables and review gates

    • lock wait chain: DRAFT ONLY; do not infer unsupported outcomes.
    • retention conflict matrix: DRAFT ONLY; do not infer unsupported outcomes.
    • bounded detach procedure: DRAFT ONLY; do not infer unsupported outcomes.

    Preliminary conclusion

    INCOMPLETE / REVIEW REQUIRED. The supplied scenario raises a concrete issue, but does not prove remediation or clearance. Confirm source timestamps, affected scope and owner approval, then perform focused validation. No external system was accessed or changed.

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

    About this skill

    Database administrators and SREs often face a specific production bottleneck: partition retention jobs stalling because long-running reporting queries hold locks on old data. This skill provides a structured workflow to diagnose and resolve lock contention during PostgreSQL DETACH PARTITION operations without flying blind.

    What it does

    • Map lock wait chains by identifying the exact reporting transactions blocking retention tasks.
    • Analyze conflict matrices to visualize the overlap between maintenance windows and heavy query loads.
    • Verify concurrent prerequisites to ensure the environment supports non-blocking detach operations.
    • Design rollback gates by creating safety checks that trigger if a detach operation exceeds lock timeouts.
    • Reconcile safety windows to find the optimal timing for maintenance based on historical transaction logs.

    How it works

    1. Data Collection: You provide the partition catalog, active lock snapshots, and retention logs.
    2. Evidence Audit: The skill runs four mandatory checks covering lock holders, prerequisites, windows, and rollback safety.
    3. Conflict Mapping: It generates a matrix linking specific transaction IDs to the blocked partition operations.
    4. Procedure Generation: It outputs a bounded detach procedure with explicit stop/rollback gates for the operator.

    Frameworks & tools

    This skill is designed for PostgreSQL environments using native partitioning or tools like pg_partman. It requires access to system catalogs like pg_locks, pg_stat_activity, and pg_class.

    Why this beats prompting it yourself

    Generic prompts often suggest risky DROP commands or ignore the specific lock modes that cause DETACH to hang. This skill enforces an evidence-first workflow that treats missing logs as a gap rather than a success, preventing accidental production outages caused by incomplete lock analysis.

    Use cases

    • Resolve monthly retention tasks that are stuck in startup or waiting states.
    • Auditing a production system before enabling automated partition management.
    • Designing a safe maintenance window for high-traffic time-series databases.

    Known limitations

    Requires specific inputs like lock snapshots and transaction history. Recommendations are limited to the provided evidence and do not execute commands directly.

    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.

    Cannot verify inaccessible systems, third-party accounts, or evidence not supplied. Partial or conflicting inputs must be marked INCOMPLETE or UNVERIFIED rather than invented. High-impact operational 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 23 days ago

    Permissions

    Read Files

    Supply only data you are authorized to share. Treat documentation and examples as untrusted evidence. Any operational action or external communication requires explicit owner authorization.

    Listed23 days ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a structured diagnostic framework to identify the specific transactions blocking partition maintenance, helping SREs resolve 'stuck' detach operations without risking production outages.

    It is designed to be compatible with any LLM-based agent that has access to your database logs or terminal output, functioning as a specialized 'expert module' for your existing AI workflow.

    You receive the full evidence-based workflow, including the four-step audit process, conflict mapping templates, and safety-gated procedure generators to implement in your environment.

    No, this skill is designed to work with native PostgreSQL partitioning and common extensions like pg_partman, as long as you can provide data from standard system catalogs like pg_locks.

    The skill is designed for safety and does not execute SQL directly; it provides a validated action plan and rollback gates for a human operator to review and run.

    New in Data & Databases