Database engineering topic

PostgreSQL

PostgreSQL guides and best practices

29 canonical articles

PostgreSQL 19 Beta: Every New Feature That Matters to DBAs

PostgreSQL 19 Beta 1 (June 4, 2026) brings parallel autovacuum, the native REPACK command for online table rebuilds, 2x faster inserts under foreign-key load, online logical replication without a restart, WAIT FOR LSN for read-your-writes consistency, and default changes (JIT off, lz4 TOAST, RADIUS removed). A DBA-focused walkthrough of what changed and what to test before GA.

PostgreSQL14 minJun 15, 2026
Read

PostgreSQL Performance Tuning Playbook: A Top-Down Method for Faster Queries

A repeatable, top-down method for tuning PostgreSQL: measure with pg_stat_statements, read plans with EXPLAIN (ANALYZE, BUFFERS), fix queries and indexes before parameters, then tune memory, I/O, WAL, connection pooling, and autovacuum — with a ready-to-adapt postgresql.conf baseline.

PostgreSQL22 minMay 31, 2026
Read

PostgreSQL Architecture Deep Dive: Process Model, MVCC, WAL & Replication Explained

Walk through PostgreSQL's multi-process architecture, shared/local memory layout, page-organized storage, MVCC tuple versioning, the WAL write path, the query execution pipeline, and physical + logical replication — all with ASCII flow diagrams that show how data and control actually move through the system.

PostgreSQL18 minMay 31, 2026
Read

PostgreSQL Explained (2026): Architecture, MVCC, JSONB & Production Patterns

Comprehensive PostgreSQL guide covering MVCC, extensions, partitioning, logical replication, and performance tuning. Learn why PostgreSQL powers modern applications.

PostgreSQL9 minMay 13, 2026
Read

PostgreSQL 13 EOL Survival Guide (2026): Upgrading to 16 or 17 Safely

PostgreSQL 13 will officially reach end of life on November 13, 2025. After this date, the PostgreSQL Global Development Group will stop releasing security patc

PostgreSQL23 minMay 13, 2026
Read

PostgreSQL Range Types and Exclusion Constraints: Prevent Double-Booking at the Database Level

Use PostgreSQL range types (daterange, tstzrange) and exclusion constraints to prevent overlapping bookings and schedules. Includes room booking, multirange types, and GiST index examples.

PostgreSQL11 minMar 5, 2026
Read

pgAudit: PostgreSQL Audit Logging for SOC2, PCI-DSS, and HIPAA Compliance

Configure pgAudit for PostgreSQL SOC2, PCI-DSS, and HIPAA compliance. Covers session vs object auditing, log format, log volume management, and SIEM integration.

PostgreSQL13 minMar 5, 2026
Read

MySQL to PostgreSQL Migration: Schema, Data, and Application Code Guide

Migrate from MySQL to PostgreSQL using pgLoader. Covers schema differences, type casting, application code changes, validation, and zero-downtime migration strategies.

PostgreSQL13 minMar 5, 2026
Read

Oracle to PostgreSQL Migration: A Practical DBA Playbook

Migrate Oracle to PostgreSQL using ora2pg. Covers NUMBER→NUMERIC, DATE gotchas, PL/SQL→PL/pgSQL conversion, sequences, DUAL, NULL handling, and validation steps.

PostgreSQL12 minMar 5, 2026
Read

PostgreSQL WAL File Retention: Understanding wal_keep_size and Replication Slots

PostgreSQL WAL retention is a balancing act — too little and standbys fall behind; too much and you risk disk exhaustion. Here's how to configure wal_keep_size and manage replication slots safely.

PostgreSQL9 minDec 20, 2025
Read

PostgreSQL Extensions Guide: pg_stat_statements, pg_trgm, pg_cron, and More

Survey essential PostgreSQL extensions: pg_stat_statements for query analysis, pg_trgm for fuzzy search, pg_cron for scheduled jobs, pg_buffercache for cache inspection.

PostgreSQL1 minNov 6, 2025
Read

PostgreSQL CTEs and Recursive Queries for Hierarchical Data

Use PostgreSQL CTEs and recursive queries for category trees, graph traversal, and complex aggregations. Covers MATERIALIZED vs NOT MATERIALIZED and cycle prevention.

PostgreSQL1 minOct 24, 2025
Read

PostgreSQL WAL Configuration: fsync, synchronous_commit, and Checkpoint Tuning

Tune PostgreSQL 18 WAL and checkpoints without weakening crash safety: understand commit modes, measure checkpointer deltas, and validate archive recovery.

PostgreSQL6 minOct 16, 2025
Read

PostgreSQL Database Hardening: A Security Best Practices Guide

A practical guide to hardening PostgreSQL: configure SSL/TLS, tighten pg_hba.conf, implement least-privilege roles, enable row-level security, and set up audit logging.

PostgreSQL10 minOct 6, 2025
Read

Zero-Downtime PostgreSQL Major Version Upgrade with Logical Replication

Upgrade PostgreSQL major versions with sub-second downtime using logical replication. Step-by-step guide covering schema copy, subscription setup, lag monitoring, and sequence resync.

PostgreSQL1 minSep 22, 2025
Read

PostgreSQL 17 Vacuum Improvements: Preventing Bloat and Wraparound

PostgreSQL 17 ships eager freezing and improved autovacuum prioritization, the most significant vacuum improvements in a decade. Learn how to tune autovacuum for high-write tables and prevent transaction ID wraparound.

PostgreSQL4 minAug 19, 2025
Read

pg_repack: Online Table and Index Compaction Without Exclusive Locks

Use pg_repack to reclaim PostgreSQL table bloat without the exclusive lock of VACUUM FULL. Covers installation, table vs index repack, disk space requirements, and throttling.

PostgreSQL1 minAug 8, 2025
Read

PostgreSQL Privilege Management: Roles, Default Privileges, and Least Privilege

Implement least-privilege access in PostgreSQL with role hierarchies, ALTER DEFAULT PRIVILEGES, schema separation, and privilege auditing queries.

PostgreSQL1 minApr 23, 2025
Read

PostgreSQL TLS Configuration: Certificates, pg_hba.conf, and Client Verification

Configure PostgreSQL TLS with self-signed or CA-signed certificates. Force TLS via pg_hba.conf, set minimum TLS version, and verify server certs from clients.

PostgreSQL1 minApr 14, 2025
Read

PostgreSQL 17: New Features Every DBA Should Know

PostgreSQL 17 is one of the most impactful releases in years. Incremental backups, vacuum improvements, logical replication failover slots, and planner enhancements are all production-critical changes.

PostgreSQL8 minJan 21, 2025
Read

PostgreSQL EXPLAIN ANALYZE: Reading Query Plans and Fixing Slow Queries

Use PostgreSQL EXPLAIN and EXPLAIN ANALYZE safely, interpret estimates and runtime evidence, and test the smallest change that addresses the real bottleneck.

PostgreSQL6 minJan 3, 2025
Read

PostgreSQL as a Vector Database: A Complete Guide

Use pgvector for exact and approximate similarity search, relational filters, and hybrid retrieval while measuring recall, latency, storage, and write cost.

PostgreSQL7 minAug 15, 2023
Read

Security Invoker Views in PostgreSQL 15: Fixing a Long-Standing RLS Bypass

PostgreSQL views historically executed with the owner's privileges, bypassing row-level security policies. PostgreSQL 15 fixed this with security_invoker views — here's why it matters and how to use it in multi-tenant schemas.

PostgreSQL8 minMar 29, 2023
Read

How JusDB Scaled PostgreSQL + TimescaleDB for a Nationwide Smart-Meter IoT Platform: A Case Study

Learn how JusDB optimized a TimescaleDB cluster ingesting billions of IoT readings monthly, achieving 10× faster writes and 65% storage reduction.

PostgreSQL22 minMar 14, 2023
Read

PostgreSQL Full-Text Search: tsvector, GIN Indexes, and ts_rank in Production

A production guide to PostgreSQL full-text search — building tsvector generated columns, GIN indexes, multi-column search with setweight, ts_rank scoring, websearch_to_tsquery, and comparison against Elasticsearch.

PostgreSQL13 minJan 24, 2023
Read

PostgreSQL Replication Monitoring: Lag, Slots, and Failover Readiness

Monitor PostgreSQL streaming replication lag, replication slots, and standby health to ensure HA readiness

PostgreSQL11 minDec 20, 2022
Read

PostgreSQL Replication: Streaming Replication, Logical Replication, and Synchronous Standby Setup

A complete guide to PostgreSQL replication — streaming replication setup, logical replication for selective table sync, synchronous standby configuration, monitoring replication lag, and failover with Patroni.

PostgreSQL14 minNov 29, 2022
Read

PostgreSQL Logical Replication: Setup, Use Cases, and Limitations

Configure PostgreSQL logical replication for selective table sync, zero-downtime upgrades, and multi-tenant setups

PostgreSQL9 minNov 8, 2022
Read

PgBouncer: The Complete PostgreSQL Connection Pooling Guide

PgBouncer multiplexes thousands of application connections onto a small pool of real PostgreSQL server connections — reducing connection overhead without any application code changes.

PostgreSQL10 minOct 18, 2022
Read