Skip to main content

PostgreSQL

Browse all articles, tutorials, and guides about PostgreSQL

7posts

Guides

Posts

DevOps
|10 min read

Stop Using Random UUIDs as Primary Keys: uuidv7() Lands in PostgreSQL 18

Random UUIDv4 primary keys quietly wreck insert speed and bloat indexes on large tables. PostgreSQL 18 ships a native time-ordered uuidv7() that keeps the upsides of UUIDs without the B-tree penalty. Here are the numbers and how to adopt it.

DevOps
|13 min read

Zero-Downtime Database Migrations for PostgreSQL in Production

A single ALTER TABLE can take down a busy PostgreSQL database for minutes. This post shows why that happens and how to ship schema changes safely with lock timeouts, the expand-and-contract pattern, and copy-paste SQL recipes for indexes, columns, constraints, and type changes.

Docker
|9 min read

Connecting to PostgreSQL in a Docker Container from Outside

Expose PostgreSQL safely and connect from your host or another machine using Docker and Docker Compose. Covers port publishing, listen addresses, pg_hba.conf basics, and common troubleshooting.

Docker
|8 min read

How to Handle Persistent Storage for Databases in Docker

Learn how to properly manage database data in Docker containers using volumes, bind mounts, and best practices for data persistence across container restarts and deployments.

Linux
|6 min read

How to Check Which Version of PostgreSQL You Are Running

Learn multiple ways to check your PostgreSQL version, including psql commands, SQL queries, and system commands. Find version numbers from the server, client, and package manager.

Kubernetes
|8 min read

Why Running Postgres on Kubernetes Is Still a Bad Idea (And What to Do Instead)

Everyone wants to run databases on Kubernetes, but should you? We explore the real challenges of stateful workloads and better alternatives.