Blog

Notes on DevOps, Kubernetes, self-hosted infrastructure and consulting.
21 posts tagged postgresql · clear filter
November 13, 2026
PostgreSQL Major Version Upgrades: Choosing Between pg_upgrade, Dump and Restore, and Logical Replication
A major version upgrade is a data migration in disguise. How the three methods compare on downtime and rollback, the real cost of pg_upgrade's link mode, post-u...
postgresql operasyon guvenilirlik
Read more →
November 8, 2026
Idempotency Keys: Handling Retried POST Requests Without Doing the Work Twice, Scope, Concurrency and Stuck Records
Retrying a timed out POST can create the same order twice. Choosing between natural idempotency, a key stored in the same transaction as the business data and a...
api-tasarimi guvenilirlik postgresql
Read more →
November 7, 2026
Unicode Normalization: Strings That Look the Same but Are Not, Choosing Between NFC and NFKC, and Where to Normalize
Two file names that look identical slip past a unique constraint and search only half works. The difference between NFC, NFD and NFKC, normalizing at the bounda...
backend api-tasarimi postgresql
Read more →
November 4, 2026
PostgreSQL Replication Slots: The Forgotten Slot That Fills the Disk, Capping WAL, and the xmin That Stops Vacuum
A replication slot whose consumer is gone fills the primary's disk with WAL and stalls autovacuum. How to choose between slots, wal_keep_size and a WAL archive,...
postgresql yuksek-erisilebilirlik operasyon
Read more →
November 3, 2026
Table Partitioning in PostgreSQL: When You Need It, Partition Pruning, Dropping Old Data and Lock Pitfalls
Partitioning is less about making a big table fast and more about dropping time-based data cheaply. How to set up range partitioning, create and detach partitio...
postgresql performans operasyon
Read more →
November 2, 2026
The Lost Update Problem: Atomic Updates, Pessimistic Locks, Version Columns and If-Match
Any read, modify, write code path loses data under concurrent load. How to choose between atomic updates, FOR UPDATE and optimistic version checks, how ETag and...
postgresql api-tasarimi backend
Read more →
November 1, 2026
Choosing a Primary Key: Deciding Between bigint, UUIDv4 and UUIDv7
Auto-increment integers leak business volume, random UUIDs scatter index writes and inflate WAL on large tables. Separating the two jobs of a key, why UUIDv7 sh...
postgresql backend performans
Read more →
October 27, 2026
Storing Timestamps Right: Instants vs Wall Time, UTC, Time Zone Names and DST Traps
Most date bugs surface at a DST transition or when a country changes its rules. Store past events as instants and future calendar events as local time plus zone...
postgresql backend api-tasarimi
Read more →
October 26, 2026
Finding Slow Queries and Reading Plans in PostgreSQL: pg_stat_statements, EXPLAIN ANALYZE and Where the Planner Goes Wrong
Measure the load before adding an index: finding the truly expensive query with pg_stat_statements, comparing estimates with reality in EXPLAIN (ANALYZE, BUFFER...
postgresql performans gozlemlenebilirlik
Read more →
October 25, 2026
The Turkish I Problem: Locale Dependent Case Conversion, Database Collations and Catching It in Tests
Under a Turkish locale "ID".toLowerCase() returns "ıd", and enums, config keys or email uniqueness quietly break. How to separate machine text from human text,...
backend postgresql test
Read more →
October 24, 2026
Keyset Instead of Offset: Cursor Pagination, Unique Sort Keys and Rows Lost at Page Boundaries
Why OFFSET slows down on deep pages and drops rows when data changes underneath it. Keyset pagination with row comparisons in PostgreSQL, opaque cursor design,...
postgresql api-tasarimi performans
Read more →
October 22, 2026
Why a Distributed Lock Is Not Enough: Leases, Fencing Tokens, and Choosing Between Redis, PostgreSQL and etcd
A leased lock can end up with two holders when the owner pauses. The efficiency versus correctness distinction, rejecting stale holders with fencing tokens, cho...
mimari guvenilirlik backend
Read more →
October 21, 2026
Read Replica Lag: Read-Your-Writes Consistency, Sticky Sessions and Log Positions
Move reads to a replica and users stop seeing what they just saved. Why lag is never zero, choosing between sticky sessions, WAL position tracking and synchrono...
postgresql mimari olceklenebilirlik
Read more →
October 15, 2026
The Get-or-Create Race: Duplicate Rows Under Concurrency, Unique Constraints and ON CONFLICT Traps
Check-then-insert is flawless for one request and quietly produces duplicates under parallel ones. Why application locks fall short, why a unique constraint is...
postgresql backend guvenilirlik
Read more →
October 11, 2026
PostgreSQL Autovacuum and Table Bloat: Dead Tuples, Transactions That Block Cleanup, and Per-Table Tuning
Default autovacuum thresholds let cleanup fall behind on large tables. How to measure bloat, find the old transactions that freeze cleanup, tune per table, get...
postgresql performans operasyon
Read more →
October 3, 2026
Zero-Downtime Secret Rotation: Dual Keys, Alternating Users and the Consumers Left Behind
Rotation outages are caused by consumers, not by the value. Overlap windows, dual keys and alternating users, measuring the cutover, and the long-running proces...
sir-yonetimi guvenlik operasyon
Read more →
October 2, 2026
Point-in-Time Recovery in PostgreSQL: WAL Archiving, pgBackRest and Restore Traps
A nightly pg_dump means losing up to a day of data. How to rewind PostgreSQL to one second before a bad query with physical backups and a continuous WAL archive...
postgresql yedekleme felaket-kurtarma
Read more →
October 1, 2026
The Transactional Outbox: Writing to a Database and a Queue Without Losing Events
Why commit-then-publish loses events, how to build an outbox table, whether to relay by polling or CDC, and how to avoid the sequence gap, duplicate delivery an...
mimari kuyruk backend
Read more →
September 28, 2026
PostgreSQL Connection Pooling: PgBouncer's Three Modes, the Prepared Statement Trap and Multi-Tenant Sizing
How to choose between session, transaction and statement modes, what breaks in transaction mode, why the prepared statement error only appears under load, and h...
postgresql performans multi-tenant
Read more →
September 25, 2026
Zero-Downtime Schema Migrations: Expand and Contract, Locks and PostgreSQL Pitfalls
Rolling deploys are not enough; a schema change breaks the moment old and new versions run side by side. How to migrate PostgreSQL without downtime using expand...
postgresql backend saas
Read more →
August 25, 2026
Designing a multi-tenant SaaS: isolation strategies and what they really cost
Database per tenant, schema per tenant and shared tables with a tenant column carry very different migration, backup, noisy neighbour and leak costs. Which one...
saas multi-tenant postgresql
Read more →