What problem does it solve?
Manually tracking Cloud SQL for PostgreSQL replication lag, managing replication slots, and auditing database role permissions is time-consuming and prone to oversight, especially for teams managing multiple database instances.
Core Features & Use Cases
- Replication Health Monitoring: Pull real-time lag metrics for all replicas, including sent, write, flush, and replay lag, to quickly identify sync bottlenecks.
- Replication Slot Management: View all replication slots and their outstanding WAL sizes to prevent unnecessary storage consumption from unused slots.
- Role & Security Auditing: List all database roles with their permission attributes, connection limits, and membership details to ensure compliance with security policies.
- Use Case: If you are troubleshooting a read replica that is falling behind the primary, use this skill to pull replication stats and identify if the lag is caused by network latency or long-running queries on the replica.
Quick Start
Ask your AI agent to pull the current replication lag metrics for all PostgreSQL replicas in your Cloud SQL instance and list any roles with superuser privileges.