cloud-sql-postgres-health

Diagnose query bottlenecks and resource constraints in Google Cloud SQL for PostgreSQL instances.

2|1|Updated May 25, 2026
One-click install
npx skills add https://github.com/interflownex/All-in-One --skill cloud-sql-postgres-health-interflownex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-sql-postgres-health
Source: https://github.com/interflownex/All-in-One/tree/main/.gemini/skills/cloud-sql-postgres-health
Command: npx skills add https://github.com/interflownex/All-in-One --skill cloud-sql-postgres-health-interflownex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @toolbox-sdk/server, and includes scripts (resource) components.

What problem does it solve?

This skill addresses the complexity of maintaining high-performance PostgreSQL databases on Google Cloud by providing automated diagnostic tools for query performance, system resource utilization, and lock contention.

Core Features & Use Cases

  • Performance Auditing: Analyze query execution plans and identify bottlenecks using pg_stat_statements and EXPLAIN plans.
  • Resource Monitoring: Fetch real-time Cloud Monitoring metrics for CPU, memory, and disk I/O to prevent outages.
  • Operational Maintenance: Quickly identify long-running transactions and lock contention that could lead to database deadlocks or performance degradation.

Quick Start

Ask the assistant to list the top 20 active queries currently running on your database instance to identify potential performance bottlenecks.

Frequently Asked Questions about cloud-sql-postgres-health

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor Cloud SQL PostgreSQL performance bottlenecks?

Find active queries causing Cloud SQL PostgreSQL performance bottlenecks by asking the assistant to list top running queries. It analyzes execution plans using pg_stat_statements and EXPLAIN to pinpoint resource-intensive operations.

How can I check Cloud SQL PostgreSQL CPU and memory metrics?

Check Cloud SQL PostgreSQL CPU and memory metrics by fetching real-time Cloud Monitoring data. This skill retrieves system resource utilization metrics to help prevent potential database outages caused by resource exhaustion.

What is the best way to identify transaction lock contention in PostgreSQL?

Identify transaction lock contention in PostgreSQL by monitoring native database statistics for long-running transactions. This skill detects lock contention and operational deadlocks that lead to severe performance degradation.

Do I need specific IAM permissions to monitor Cloud SQL PostgreSQL instances?

You need valid Google Cloud project credentials and appropriate IAM permissions to monitor Cloud SQL PostgreSQL instances. These permissions are required to access Cloud Monitoring metrics and retrieve native Postgres database statistics.

How does pg_stat_statements help with PostgreSQL performance tuning on GCP?

pg_stat_statements helps with PostgreSQL performance tuning on GCP by providing aggregated query execution statistics. This skill leverages those statistics to analyze execution plans and identify bottlenecks in Cloud SQL instances.

What are the limitations of using PromQL for Cloud SQL database monitoring?

PromQL for Cloud SQL database monitoring requires proper Google Cloud project configuration and valid IAM permissions. If credentials lack access to Cloud Monitoring metrics or native Postgres statistics, diagnostic queries will fail to execute.