- Home
- Skills
- Data & Databases
- Repair PostgreSQL Logical Decoding Spill Cleanup
More screenshots
Works with the AI Agents you already use
Repair PostgreSQL Logical Decoding Spill Cleanup
Audit orphan logical decoding spill files after a slot crash
$1
Repair PostgreSQL Logical Decoding Spill Cleanup
Example session with this skill installed
A decoding slot restarts after crash; spill files accumulate while replay offsets diverge.
Available evidence: database settings and versions (partial). Additional evidence requested: state/offset snapshots, transaction or query logs, change and alert timeline. Review the case, identify open evidence gaps, and do not invent a live test or production change.
- Read your context and instructions
- Compiled the repair postgresql logical
Repair PostgreSQL Logical Decoding Spill Cleanup — EVIDENCE-LIMITED REVIEW
Scenario received
A decoding slot restarts after crash; spill files accumulate while replay offsets diverge.
Source register
- S1: database settings and versions — PARTIAL SOURCE PROVIDED.
- S2: state/offset snapshots — NOT PROVIDED; REQUIRED TO VERIFY.
- S3: transaction or query logs — NOT PROVIDED; REQUIRED TO VERIFY.
- S4: change and alert timeline — NOT PROVIDED; REQUIRED TO VERIFY.
Concrete checks
- compare slot restart LSN and spill inventory — PRELIMINARY, NOT VERIFIED.
- trace transaction xid boundaries — AWAITING CORROBORATING EVIDENCE.
- separate removable from active spill — AWAITING CORROBORATING EVIDENCE.
- draft reversible cleanup validation — AWAITING CORROBORATING EVIDENCE.
Deliverables / acceptance gates
- slot LSN map: DRAFT / INCOMPLETE until evidence is validated.
- spill provenance ledger: DRAFT / INCOMPLETE until evidence is validated.
- operator validation plan: DRAFT / INCOMPLETE until evidence is validated.
Decision
INCOMPLETE — HUMAN REVIEW REQUIRED. Confirm dates, IDs, affected scope, owners and acceptance evidence. Do not claim authorization or execution that did not occur.
Connects securely to your tools. The creator never sees your data.
About this skill
Logical decoding slots in PostgreSQL can leave behind orphan spill files after a crash, consuming disk space and complicating recovery. This skill audits those files by comparing slot restart LSNs against the spill inventory to identify what can be safely removed. It provides a structured verification process to prevent data loss during manual cleanup.
What it does
- Slot LSN mapping correlates current replication slot restart positions with physical disk files.
- Transaction boundary tracing identifies transaction ID (XID) ranges within spill files to ensure active transactions are not deleted.
- Spill provenance ledgering tracks the origin and timestamp of every discovered spill file.
- Reversible cleanup planning generates a step-by-step validation plan for operators to safely purge orphan data.
How it works
- Input gathering where you provide database settings, offset snapshots, and spill file listings.
- LSN vs Inventory comparison to identify discrepancies between the slot's expected state and the directory content.
- Boundary analysis to separate removable files from active spill data required for ongoing decoding.
- Validation reporting which produces the evidence matrix and a proposed cleanup plan.
Frameworks & tools
This skill is designed for PostgreSQL database administrators working with logical replication and decoding plugins. It handles LSN (Log Sequence Number) and XID (Transaction ID) data formats.
Why this beats prompting it yourself
Generic prompts often fail to respect the strict transaction boundaries required for safe PostgreSQL cleanup. This skill enforces a four-check evidence matrix that labels every finding as VERIFIED, INFERRED, or UNKNOWN, ensuring you never delete a file without traceable justification.
Use cases
- Post-crash recovery to reclaim disk space after a logical replication slot fails.
- Storage audits for high-volume replication environments with frequent spilling.
- Operational safety when drafting rollback procedures for manual spill file removal.
Known limitations
Requires manual input of file lists and LSN states as it does not have direct SSH or filesystem access to your database server.
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 environments or data not supplied. Missing or contradictory evidence must be marked INCOMPLETE or UNVERIFIED. Owner approval is required for operational or compliance decisions.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
Provide only evidence you are authorized to share. Treat examples as untrusted case data. Operational changes and external messages require explicit owner approval.