Tag: #postgresql
Writing on GPUs, LLMs, MLOps, Kubernetes — and mindset · 60 posts
The Complete Guide to Transaction Isolation Levels: The Part the Application Owns, Not the Database
Lays out the four isolation levels of PostgreSQL 18 exactly as documented, then covers what the application must implement on top of that: the 40001 serialization-failure retry layer, the row-lock ladder from FOR UPDATE
2026-08-15 · 19 min read #database#postgresql#transaction#isolation-level#concurrencyThe Complete Guide to Partitioning and Sharding: The Order for Moving Past a Single Node
A look at what declarative partitioning in PostgreSQL 18 actually solves and does not solve, then the criteria for moving from partitioning to sharding once partitioning hits its limit. Covers partition pruning, the cons
2026-08-15 · 19 min read #database#postgresql#partitioning#sharding#scalabilityThe Complete Guide to Connection Pools: The Contract a Pooling Mode Makes with Your Application
A look at connection pools through the lens of a contract, based on PostgreSQL 18 and PgBouncer. Covers what the three pooling modes, session, transaction, and statement, each guarantee and each give up; why prepared sta
2026-08-15 · 16 min read #database#postgresql#pgbouncer#connection-pool#operationsThe Complete Guide to SQL Execution Plans: How the Optimizer Chooses a Plan
This piece explains the execution plan from the point of view of the PostgreSQL 18 planner: how statistics are collected, how selectivity is calculated, which constants assemble the cost numbers, when join-order search h
2026-08-15 · 24 min read #database#postgresql#execution-plan#query-optimization#optimizerThe Complete Guide to Database Performance Tuning: Measure Before You Touch a Parameter
Organizes PostgreSQL 18 performance tuning as a diagnostic order rather than a parameter list: profile the workload with pgstatstatements, split the bottleneck by wait event, read the cache and I/O metrics, and only then
2026-08-15 · 17 min read #database#postgresql#performance-tuning#monitoring#operationsThe Complete Guide to Database Caching Strategy: In the End, It's All Invalidation
Working from PostgreSQL 18, this guide builds caching up from the database outward: the cache layers that already exist — sharedbuffers and the OS cache — the computed cache that is a materialized view, the criteria for
2026-08-15 · 24 min read #database#postgresql#caching#performance-tuning#architectureThe Complete Guide to Zero-Downtime Schema Changes: The Lock Level Each DDL Takes and How to Run It Safely
Working from the PostgreSQL 18 documentation, this lays out by grade exactly which lock each DDL statement takes: the eight table lock modes and their conflicts, the lock level of every ALTER TABLE variant, which changes
2026-08-15 · 18 min read #database#postgresql#schema-migration#zero-downtime#lockingThe Complete Guide to PostgreSQL Indexes: The Index Lifecycle from Design to Retirement
This piece treats the PostgreSQL 18 index as an operational asset with a full lifecycle: the design decisions behind column order, the judgment call between six index types, the procedure for building one safely with CON
2026-08-15 · 23 min read #database#postgresql#index#performance-tuning#operationsThe Complete Guide to Data Modeling: From Logical Model to PostgreSQL Physical Schema
Covers the decisions you have to make when translating a logical model into a physical schema on PostgreSQL 18: surrogate keys and identifier types, the grounds for choosing text, numeric, and timestamptz, treating const
2026-08-15 · 19 min read #database#postgresql#data-modeling#schema-design#constraintsThe Complete Guide to Bulk Data Processing: COPY, Chunked Batches, and Reversible Operations
This guide covers how to safely load, update, and delete hundreds of millions of rows in PostgreSQL 18: COPY's options and defaults, the initial-load procedure the documentation recommends, tolerating bad rows with ONERR
2026-08-15 · 24 min read #database#postgresql#batch-processing#data-loading#operationsOpen Source Worth Watching Right Now (3) Infrastructure and Databases
Databases and infrastructure are the field where license changes and forks redrew the board. From analytics engines and embedded databases to Postgres extensions, Kubernetes operators, and IaC, this post introduces 11 op
2026-08-12 · 5 min read #open-source#database#infrastructure#postgresql#kubernetesThe 300x Is Not a Number You Get by Tuning PostgreSQL — The Volcano Model and Vectorized Execution
A precise dissection of the 300x published alongside the pgrust 0.2 release. That figure did not come from changing a PostgreSQL setting; it is a ClickBench measurement of a database newly implemented in Rust, while the
2026-08-09 · 9 min read #postgresql#database#performance#query-engine#simdTransaction Isolation Levels and the Anomalies You Actually Hit — Where the Standard Definition Diverges from the Implementation
A walkthrough of the four transaction isolation levels and of dirty read, non-repeatable read, and phantom read — but one that does not stop at the textbook table. Using real SQL sessions, it shows why the Read Committed
2026-07-26 · 14 min read #database#postgresql#transaction#isolation-level#mysqlDiagnosing and Preventing Deadlocks — How to Pin Down the Two Queries from the Log
A step-by-step guide to what you should look at when you hit a deadlock detected error. How to interpret the PostgreSQL deadlock report and the SHOW ENGINE INNODB STATUS output of MySQL line by line so you can pin down w
2026-07-26 · 16 min read #database#postgresql#deadlock#locking#mysqlWhy the Index You Created Is Not Being Used — The Cases Where the Optimizer Is Right and You Are Wrong
A cause-by-cause breakdown of why a Seq Scan stays in the query plan even after you create an index. Low selectivity making the optimizer ignore it on purpose, a function or arithmetic on the column making the condition
2026-07-26 · 14 min read #database#postgresql#index#query-optimization#mysqlHow to Read EXPLAIN ANALYZE — Finding the Real Bottleneck in a Query Plan
A walkthrough of how to read EXPLAIN ANALYZE output from beginning to end. Which order to read the nodes in, why cost is not a unit of time, what the gap between estimated and actual row counts tells you, and how to avoi
2026-07-26 · 13 min read #database#postgresql#explain#query-optimization#performanceWhy a Big Connection Pool Costs You — Deciding Where to Put the Queue
An explanation of the mechanism behind the phenomenon where enlarging a connection pool actually makes things slower. Why a connection is expensive under the process model of PostgreSQL, why it is better to put the queue
2026-07-26 · 15 min read #database#postgresql#connection-pool#pgbouncer#performancepg_plan_advice in Postgres 19: The Compromise From a Project That Has Long Refused Hints
The PostgreSQL project has refused optimizer hints for a long time. But PostgreSQL 19 Beta 1, released on June 4, 2026, added two contrib modules built by Robert Haas: pgplanadvice and pgstashadvice. This isn't Oracle-st
2026-07-16 · 14 min read #postgresql#query-planner#query-optimization#database#performancepgrust: Postgres Rewritten in Rust, Passing 100% of the Regression Tests — What That Actually Means
Malcolm Matis (malisper) released pgrust, a rewrite of Postgres in Rust. It targets Postgres 18.3 compatibility, passes more than 46,000 regression queries, and boots from an existing 18.3 data directory. This piece is a
2026-07-11 · 6 min read #postgresql#rust#pgrust#database#regression-testsSpinning Up and Killing Postgres on Kubernetes with CloudNativePG — Failover Measured at 23 Seconds
On a real 8-node Kubernetes cluster, I installed CloudNativePG (CNPG) v1.30.0, brought up a 3-instance Postgres cluster, and then actually killed the primary. From bootstrap through replication checks, to failover after
2026-07-11 · 5 min read #cloudnativepg#postgresql#kubernetes#operator#database