postgresql

Document PostgreSQL installation, SQL operations, replication, and performance tuning.

191|53|Updated Dec 2, 2014
One-click install
npx skills add https://github.com/dreamsxin/example --skill postgresql-dreamsxin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql
Source: https://github.com/dreamsxin/example/tree/main/postgresql
Command: npx skills add https://github.com/dreamsxin/example --skill postgresql-dreamsxin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to PostgreSQL, covering installation, essential commands, advanced features like replication and partitioning, and performance tuning. It aims to equip users with the knowledge to effectively manage and leverage PostgreSQL databases.

Core Features & Use Cases

  • Installation & Setup: Guides through installing PostgreSQL on various systems and configuring replication.
  • Core SQL & psql: Covers fundamental SQL commands and the psql interactive terminal.
  • Advanced Features: Explains concepts like FDW, JSONB, Window Functions, CTEs, and extensions like TimescaleDB, CitusDB, and pg_vector.
  • Performance Tuning: Details various postgresql.conf parameters and optimization strategies.
  • Use Case: A developer needs to set up a read replica for their PostgreSQL database to improve read performance. They can follow the steps in the master-slave.md guide to configure replication.

Quick Start

Install PostgreSQL and connect to the database using psql.

Frequently Asked Questions about postgresql

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

FAQPage Schema
How do I configure PostgreSQL replication for a read replica?

You can configure PostgreSQL replication by setting up a master-slave architecture to create a read replica. This process improves database read performance by distributing query workloads across multiple nodes.

What PostgreSQL extensions are available for time-series and vector data?

PostgreSQL supports extensions like TimescaleDB for time-series data, CitusDB for distributed databases, and pg_vector for vector operations. These extensions enable specialized data handling within the standard database environment.

How do I tune PostgreSQL performance using configuration parameters?

PostgreSQL performance tuning requires adjusting `postgresql.conf` parameters and applying optimization strategies. This configuration process optimizes query execution and improves overall database resource utilization.

Can I use JSONB and Window Functions in PostgreSQL for data analysis?

PostgreSQL supports advanced features like JSONB for document storage and Window Functions for analytical queries. These SQL capabilities allow data analysts to perform complex data manipulations directly within the database.

How do I use psql interactive terminal for core SQL operations?

The `psql` interactive terminal allows you to execute fundamental SQL commands and manage PostgreSQL databases. It provides a direct command-line interface for essential database operations and query execution.