Databases & SQL · PostgreSQL

PostgreSQL Tutorial

SQL ergonomics through EXPLAIN intuition, transactional behaviour, pragmatic schema design.

Sponsored

Lesson outline

  1. 133
    Using jsonb for Flexible Data

    Learn to use PostgreSQL's jsonb data type for flexible, schema-less data models. This lesson explains when and how to choose jsonb over traditional relational columns, with a hands-on example, performance considerations, and common pitfalls.

  2. 134
    Effective Index Strategies

    Design effective index strategies for PostgreSQL to speed up queries and keep writes fast. Learn when to use B-tree, GIN, or partial indexes, how to avoid common pitfalls like redundant or unused indexes, and how to monitor and adjust your design as your data grows.

  3. 135
    Monitor Slow Queries with pgBadger

    Learn to monitor slow queries with pgBadger in this PostgreSQL tutorial. Practical steps, troubleshooting, and next steps included.

  4. 136
    Backup Databases with pg_dump

    Learn how to back up PostgreSQL databases using pg_dump. This lesson covers the core concepts, step-by-step commands, practical examples, and common troubleshooting tips to ensure your data is safe.

  5. 137
    Restore Databases with pg_restore

    Restore databases with pg_restore — PostgreSQL Tutorial. Hands-on steps, troubleshooting, and what to study next.

  6. 138
    Schedule PostgreSQL Backups with cron

    Learn to schedule PostgreSQL backups using cron and pg_dump. This tutorial covers the core concepts, step-by-step implementation, practical examples, and troubleshooting tips to automate your database backups effectively.

  7. 139
    Set Up Streaming Replication

    Configure PostgreSQL streaming replication for a standby server. Step-by-step setup, wal_level, primary_conninfo, and verification.

  8. 140
    Use Patroni for High Availability

    Use Patroni for high availability — PostgreSQL Tutorial. Learn core concepts, hands-on steps, troubleshooting, and what's next.

  9. 141
    Load Balance Reads with HAProxy

    Load balance reads with HAProxy — PostgreSQL Tutorial.

  10. 142
    Partition Tables by Range and List

    Learn to partition tables by range and list in PostgreSQL — practical steps, troubleshooting, and what to study next.

  11. 143
    Declarative Partitioning in PostgreSQL

    Learn to use declarative partitioning in PostgreSQL. Understand the core concept, apply it in a hands-on exercise, and discover best practices for performance and maintenance.

  12. 144
    Migrate Data with pgloader

    Learn how to migrate data into PostgreSQL using pgloader. This hands-on tutorial covers the core concepts, step-by-step migration, troubleshooting, and what to explore next.

    PostgreSQL Tutorial — step-by-step tutorials

    What you will find here

    This track walks through postgresql tutorial in order — each lesson is server-rendered HTML you can read without JavaScript. Follow the outline, then practice in the browser IDE when a lesson links to runnable code.

    Tutorials vs quizzes and code samples

    Tutorials teach in sequence. For quick checks use quizzes. For copy-paste snippets see code samples. For deeper reading browse articles.