postgresql

Manage PostgreSQL databases with commands for connection, backup, and tuning.

50|13|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/chaterm/terminal-skills --skill postgresql-chaterm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql
Source: https://github.com/chaterm/terminal-skills/tree/main/database/postgresql
Command: npx skills add https://github.com/chaterm/terminal-skills --skill postgresql-chaterm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance and commands for managing, optimizing, and troubleshooting PostgreSQL databases, simplifying complex database tasks.

Core Features & Use Cases

  • Connection Management: Connect to local or remote PostgreSQL instances and execute SQL commands.
  • User and Permission Control: Create, manage, and grant privileges to database users and roles.
  • Database Operations: Perform essential tasks like creating, deleting, and backing up databases and tables.
  • Performance Monitoring & Optimization: Analyze query performance, identify bottlenecks, and tune database settings.
  • Backup and Recovery: Utilize pg_dump and pg_restore for robust data backup and restoration.
  • Troubleshooting: Address common issues like connection problems, slow queries, and lock waits.

Quick Start

Connect to the PostgreSQL database as the 'postgres' user and list all available databases.

Frequently Asked Questions about postgresql

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

FAQPage Schema
How do I manage PostgreSQL database connections and execute SQL commands remotely?

To manage PostgreSQL database connections, you can connect to local or remote instances as the 'postgres' user and execute essential SQL queries or psql utility commands directly. This allows you to list available databases and perform standard data operations.

What is the best way to create database users and manage role permissions in PostgreSQL?

Managing PostgreSQL role permissions involves using specific commands to create database users, assign roles, and grant privileges. This ensures proper access control and user management across your database environment.

How do I backup and restore PostgreSQL databases using pg_dump and pg_restore?

To backup and restore PostgreSQL databases, you utilize the pg_dump utility to create robust data backups and pg_restore to recover them. This process ensures your database data remains safe and can be fully restored when needed.

How can I analyze query performance and tune PostgreSQL settings to fix slow queries?

To fix slow PostgreSQL queries, you can analyze query performance to identify bottlenecks and tune database settings accordingly. This performance monitoring and optimization process helps address slow queries and lock waits effectively.

Why does my PostgreSQL database have connection problems and how do I troubleshoot them?

PostgreSQL connection problems can be addressed by following dedicated troubleshooting steps for common database issues. This involves diagnosing connection drops, slow query execution, and lock waits to restore normal database operations.