Blog

Notes from the database floor.

Practical write-ups on migrations, monitoring, architecture, and the incidents we've learned the most from — from the engineers who actually do the work, not a marketing team.

📈 Monitoring

MySQL InnoDB History List Length: Why It Grows and How to Bring It Down

What the InnoDB history list length in SHOW ENGINE INNODB STATUS means, why long-running transactions and heavy DML make it grow, how to find the transaction holding purge back, how purge and undo truncation work, and what changes on large MySQL servers.

· 12 min read
🚨 Incident Response

PostgreSQL "canceling statement due to statement timeout": Causes and Fixes

What "canceling statement due to statement timeout" means in PostgreSQL, how it differs from lock timeout and user-request cancels, how to find where statement_timeout is set, how to fix the slow query or the lock wait behind it, and how to set timeouts safely on large databases.

· 14 min read
🏗️ Architecture

ClickHouse Delete Rows: Lightweight DELETE, Mutations or DROP PARTITION

How to delete rows in ClickHouse safely: lightweight DELETE and the _row_exists mask, ALTER TABLE DELETE mutations that rewrite parts, DROP PARTITION and TTL for old data, monitoring and killing stuck mutations, and what changes on large tables.

· 13 min read
📈 Monitoring

PostgreSQL "Checkpoints Are Occurring Too Frequently": What It Means and How to Fix It

What the PostgreSQL warning "checkpoints are occurring too frequently" means, how to confirm it with pg_stat_checkpointer and log_checkpoints, how to size max_wal_size from your real WAL rate, and what changes on large, write-heavy databases.

· 11 min read
📈 Monitoring

Redis Latency Spikes: How to Find the Cause with SLOWLOG, LATENCY and redis-cli

How to troubleshoot Redis latency spikes: reading SLOWLOG, enabling the latency monitor, measuring intrinsic latency, fork and transparent huge pages, AOF fsync, mass expiry, big key deletes, and what changes with large datasets.

· 12 min read
📈 Monitoring

Redis mem_fragmentation_ratio Too High? How to Read It and Fix It

What a high Redis mem_fragmentation_ratio really means, why it is not a pure fragmentation metric, how to tell true fragmentation from a past peak or swapping, how active defragmentation works in Redis and Valkey, and what to do on large instances.

· 13 min read
🔄 Migrations

MySQL ALTER TABLE Without Downtime: INSTANT, INPLACE, gh-ost or pt-osc

How to run MySQL ALTER TABLE without downtime on large tables: which operations are INSTANT, what INPLACE really locks, the metadata lock queue that freezes production, disk space and replica lag on big tables, and when to switch to gh-ost or pt-online-schema-change.

· 17 min read
🚨 Incident Response

MySQL "Got a packet bigger than max_allowed_packet": How to Fix It

What MySQL error 1153 "Got a packet bigger than max_allowed_packet bytes" means, why the client and server limits differ, how to raise max_allowed_packet safely with SET PERSIST or my.cnf, and what to do for dump restores and replication.

· 11 min read
🔄 Migrations

pg_dump on a Large Database: Fast Dumps and Restores Without Hurting Production

How to use pg_dump on a large database: directory format and parallel jobs, compression, what a long dump does to locks and vacuum, dumping from a standby, fast parallel pg_restore, statistics after restore and when pg_dump is the wrong tool.

· 16 min read
🔄 Migrations

PostgreSQL 14 to 18 Upgrade: What Breaks and How to Do It Safely

A practical PostgreSQL 14 to 18 upgrade guide: the data checksum mismatch that stops pg_upgrade, removed settings that prevent startup, renamed backup functions, moved monitoring columns, the safe search_path change that breaks ANALYZE, MD5 deprecation, the new statistics handling and what changes on large databases.

· 23 min read
🔄 Migrations

PostgreSQL "permission denied for schema public": Why It Happens and How to Fix It

Why PostgreSQL 15 and later return "permission denied for schema public" on CREATE TABLE, why upgraded databases behave differently from new ones, and the three clean fixes: database ownership, a dedicated schema, or a targeted GRANT CREATE.

· 11 min read
🚨 Incident Response

PostgreSQL "canceling statement due to conflict with recovery": Causes and Fixes

Why PostgreSQL cancels queries on a hot standby with "canceling statement due to conflict with recovery", how to tell snapshot, lock and buffer pin conflicts apart, and when to use max_standby_streaming_delay, hot_standby_feedback, a replication slot or a separate reporting replica.

· 12 min read
🚨 Incident Response

PostgreSQL "invalid page in block": How to Handle Data Corruption

What the PostgreSQL error "invalid page in block ... of relation" means, how to map the file path to a table or index, why to copy the data directory before touching anything, how to check the damage with amcheck, pg_amcheck and pg_checksums, and when REINDEX, a restore or zero_damaged_pages is the right fix.

· 12 min read
🚨 Incident Response

PostgreSQL "sorry, too many clients already": What to Do Now and Next

What the PostgreSQL errors "sorry, too many clients already" and "remaining connection slots are reserved" mean, how to see who holds the connections, how to free slots safely right now, and why a pooler, per-role limits and timeouts beat raising max_connections.

· 10 min read
🚨 Incident Response

Redis "LOADING Redis is loading the dataset in memory": What to Do

What the Redis error "LOADING Redis is loading the dataset in memory" means, which commands still work during loading (INFO yes, PING no), how to track progress with INFO persistence, why Kubernetes probes can cause restart loops, and how swapdb and persistence choices shorten the outage.

· 12 min read
🚨 Incident Response

ClickHouse "Too many partitions for single INSERT block": Causes and Fixes

What the ClickHouse error "Too many partitions for single INSERT block (more than 100)" means, how max_partitions_per_insert_block counts partitions per block, how to load history in batches, when to raise the limit, and how to rebuild a table with a saner PARTITION BY.

· 14 min read
🚨 Incident Response

MySQL "Can't connect to local MySQL server through socket" (Error 2002): Fixes

What MySQL error 2002 "Can't connect to local MySQL server through socket" means, why localhost uses a Unix socket, how to read the (2), (13) and (111) codes, how to find the real socket path, and how to fix servers, clients and PHP apps that disagree about it.

· 12 min read
🚨 Incident Response

MySQL ERROR 1045 (28000): Access Denied for User - How to Fix It

What MySQL ERROR 1045 (28000) "Access denied for user" really checks, how user@host matching and sorting work, localhost versus 127.0.0.1, "using password: NO", CURRENT_USER(), option files, auth_socket and error 1698, and how to reset a lost root password safely.

· 16 min read
🚨 Incident Response

Redis "ERR max number of clients reached": Causes and Fixes

Why Redis and Valkey reject connections with "ERR max number of clients reached", how maxclients interacts with ulimit -n and the 32 reserved file descriptors, how to find the client leaking connections with CLIENT LIST, and when to use timeout, CLIENT KILL or a higher limit.

· 14 min read
🚨 Incident Response

ClickHouse "Too many simultaneous queries" (Error 202): Causes and Fixes

What ClickHouse error 202 TOO_MANY_SIMULTANEOUS_QUERIES means, the six limits that raise it (max_concurrent_queries and its select, insert, per-user, all-users and waiting variants), how to inspect system.processes and query_log even when the server is full, and how to configure limits and headroom.

· 12 min read
🚨 Incident Response

MySQL ERROR 1114 "The table is full": Causes and Fixes

What MySQL ERROR 1114 (HY000) "The table is full" means and how to find the real cause: a full disk, a system tablespace with a max size, the InnoDB temporary tablespaces, a MEMORY table hitting max_heap_table_size, or a MyISAM size limit. With queries and config for MySQL 8.4.

· 15 min read
🚨 Incident Response

PostgreSQL "could not resize shared memory segment": No Space Left on Device

Why PostgreSQL fails with "could not resize shared memory segment ... No space left on device", how parallel query uses dynamic shared memory in /dev/shm, why Docker containers hit it at 64 MB, and how to fix it with --shm-size, shm_size or a memory-backed emptyDir in Kubernetes.

· 13 min read
🚨 Incident Response

PostgreSQL "no pg_hba.conf entry for host": How to Fix It

What the PostgreSQL error "no pg_hba.conf entry for host" really means, how to read the IP, user, database and encryption state in the message, how to check rules with pg_hba_file_rules, reload safely, and tell it apart from "password authentication failed".

· 18 min read
🚨 Incident Response

ClickHouse "Table is in readonly mode": Causes and How to Fix It

What the ClickHouse "Table is in readonly mode" error (code 242, TABLE_IS_READ_ONLY) means, how to diagnose it with system.replicas and system.zookeeper_connection, how to check ClickHouse Keeper, and when to use SYSTEM RESTART REPLICA versus SYSTEM RESTORE REPLICA.

· 13 min read
🚨 Incident Response

How to Purge MySQL Binary Logs Safely When They Fill the Disk

Why MySQL binary logs grow, how to purge MySQL binary logs with PURGE BINARY LOGS without breaking replicas, why rm on binlog files backfires, and how to set binlog_expire_logs_seconds, compression and cloud retention so the disk does not fill again.

· 15 min read
🚨 Incident Response

PostgreSQL "out of shared memory": Fixing max_locks_per_transaction

What the PostgreSQL "out of shared memory" error with the max_locks_per_transaction hint means, how to find the session holding thousands of locks in pg_locks, why partitioned tables, pg_dump and big migration transactions trigger it, and how to raise the limit safely on a primary with standbys.

· 14 min read
🚨 Incident Response

Redis MISCONF Error: "Unable to Persist to Disk" and How to Fix It

What the Redis MISCONF "unable to persist to disk" error means, why stop-writes-on-bgsave-error blocks writes and even PING, how to find the failed BGSAVE cause in INFO persistence and the log (disk full, permissions, fork failure, OOM kill), and how to recover safely. Applies to Valkey too.

· 16 min read
🚨 Incident Response

MySQL "Deadlock found when trying to get lock" (Error 1213): Read the Log and Stop It Repeating

What MySQL error 1213 actually means, why InnoDB rolls back the whole transaction, how to read LATEST DETECTED DEADLOCK, how to log and count every deadlock, the usual causes (lock order, missing indexes, duplicate-key inserts) and how to write a retry that does not make things worse.

· 17 min read
🚨 Incident Response

"MySQL server has gone away" (Error 2006): Causes and Fixes That Actually Work

What MySQL errors 2006, 2013 and 4031 mean, how to tell an idle timeout from an oversized packet, a killed query, a server restart or a network drop, which variables to check (wait_timeout, max_allowed_packet, net_read_timeout), and why blind reconnects can silently lose transaction state.

· 15 min read
📈 Monitoring

PostgreSQL REINDEX CONCURRENTLY: Rebuild Bloated Indexes Without Downtime

How to find bloated PostgreSQL indexes with pgstatindex, why plain REINDEX blocks nearly every query, how REINDEX CONCURRENTLY works and what it cannot do, how to watch progress, clean up _ccnew and _ccold leftovers, and when deduplication and bottom-up deletion make a rebuild unnecessary.

· 13 min read
📈 Monitoring

VACUUM FULL vs pg_repack: Shrink a Bloated PostgreSQL Table Without Downtime

When a bloated PostgreSQL table actually needs a rewrite, how to measure bloat with pgstattuple_approx, why VACUUM FULL blocks every query on the table, how pg_repack works and what it needs, what PostgreSQL 19 REPACK (CONCURRENTLY) changes, and how to choose between them.

· 15 min read
🚨 Incident Response

ClickHouse "Memory limit exceeded" (Code 241): What Hit the Limit and How to Fix It

A practical guide to ClickHouse "Memory limit exceeded" (Code 241, MEMORY_LIMIT_EXCEEDED): query, user and total limits, max_memory_usage and max_server_memory_usage_to_ram_ratio, finding the culprit in system.query_log and system.processes, spilling GROUP BY, ORDER BY and joins to disk, and memory overcommit.

· 14 min read
📈 Monitoring

MySQL innodb_buffer_pool_size: How to Size It, Resize It and Know When It Is Too Small

A practical guide to MySQL innodb_buffer_pool_size: the 128MB default, what the docs recommend for dedicated servers, innodb_dedicated_server, chunks and instances, online resizing with status monitoring, warm-up after restarts and the status counters that show a pool that is too small.

· 14 min read
🚨 Incident Response

PostgreSQL "idle in transaction": Find, Kill and Prevent Stuck Sessions

What the "idle in transaction" state in pg_stat_activity really means, why it blocks locks and VACUUM, how to find the blocker with pg_blocking_pids, when to use pg_terminate_backend, and how idle_in_transaction_session_timeout, transaction_timeout and PgBouncer limits prevent it.

· 14 min read
🏗️ Architecture

Redis Persistence: RDB vs AOF and Which One You Actually Need

A practical guide to Redis persistence: RDB snapshots and save points, AOF and appendfsync, multi-part AOF since Redis 7.0, fork costs, switching from RDB to AOF on a live server without data loss, backups and monitoring.

· 13 min read
🚨 Incident Response

MySQL Replication Error 1062 and 1032: How to Fix a Broken Replica Safely

A practical runbook for MySQL replication error 1062 (duplicate entry) and 1032 (record not found): finding the failing GTID, fixing or skipping the transaction, why replica_skip_errors is a trap, and checking consistency afterwards.

· 11 min read
📈 Monitoring

MySQL Slow Query Log: Turn It On, Read It, Find What Matters

A practical guide to the MySQL slow query log: enabling it at runtime, choosing long_query_time, what Rows_examined tells you, summarising with pt-query-digest and using Performance Schema digests when you have no file access.

· 12 min read
🚨 Incident Response

PostgreSQL Point-in-Time Recovery: Undo a Bad DELETE Step by Step

A practical PostgreSQL point-in-time recovery guide: WAL archiving and base backups, checking pg_stat_archiver, restore_command, recovery.signal, recovery_target_time and pause, timelines, and why you restore to a separate server.

· 12 min read
🚨 Incident Response

PostgreSQL Transaction ID Wraparound: How to Spot It Early and Recover

A practical guide to PostgreSQL transaction ID wraparound: XID age, the warnings before the shutdown, what holds back freezing (old transactions, prepared transactions, replication slots), the official recovery steps and monitoring.

· 12 min read
🚨 Incident Response

ClickHouse "Too many parts": Why Inserts Fail and How to Fix It

A practical guide to the ClickHouse "Too many parts" error: how parts and merges work, finding the partition that hit the limit, small inserts, bad partition keys, async inserts and why raising parts_to_throw_insert only buys time.

· 11 min read
🔄 Migrations

MySQL 8.0 to 8.4 Upgrade: What Breaks and How to Do It Safely

A practical MySQL 8.0 to 8.4 upgrade guide: supported upgrade paths, mysql_native_password, removed SLAVE/MASTER statements and options, changed InnoDB defaults, the upgrade checker, rolling upgrades and why rollback needs planning.

· 12 min read
🚨 Incident Response

MySQL "Lock wait timeout exceeded" (Error 1205): Find the Blocker and Fix It

A practical guide to MySQL "Lock wait timeout exceeded; try restarting transaction": finding the blocker with sys.innodb_lock_waits, idle open transactions, missing indexes, safe retries and why raising the timeout rarely helps.

· 12 min read
📈 Monitoring

PostgreSQL Replication Lag: How to Measure It, Find the Cause and Fix It

A practical guide to PostgreSQL streaming replication lag: pg_stat_replication and its lag columns, byte vs time lag, why a quiet primary fools your alerts, replay bottlenecks, hot_standby_feedback and recovery conflicts.

· 12 min read
🚨 Incident Response

MySQL "Too many connections" (Error 1040): How to Get Back In and Fix It

A practical runbook for MySQL "Too many connections": the reserved admin slot, finding sleeping and blocked sessions, safe kills, when raising max_connections helps and when it makes things worse.

· 13 min read
🚨 Incident Response

PostgreSQL "deadlock detected": What It Means and How to Stop It

What the PostgreSQL "deadlock detected" error really means, how to read the log, the usual causes (lock order, foreign keys, batch jobs) and practical fixes, including retries and monitoring.

· 12 min read
🚨 Incident Response

PostgreSQL Disk Full: Why pg_wal Keeps Growing and How to Fix It Safely

PostgreSQL disk full and pg_wal growing? The usual causes (replication slots, failing archiving, temp files, logs), what is safe to delete in an emergency and the settings that prevent a repeat.

· 11 min read
🚨 Incident Response

Redis OOM "command not allowed": maxmemory and Eviction Policies Explained

Why Redis returns "OOM command not allowed when used memory > maxmemory", how maxmemory and eviction policies work, which policy to choose, and how to size memory for replication, persistence and fork.

· 11 min read
🚨 Incident Response

Need an Emergency DBA Right Now? Read This Before You Touch Anything

Database down and no DBA on the team? A blunt guide to the first 30 minutes: what not to touch, what to collect, and how to hand over to urgent DBA support without losing hours.

· 12 min read
📈 Monitoring

MySQL Replication Lag: Why Your Replica Falls Behind and How to Fix It

A practical guide to MySQL replication lag: receiver vs applier lag, why Seconds_Behind_Source lies, big transactions, tables without primary keys, parallel replication and monitoring.

· 11 min read
📈 Monitoring

PostgreSQL Autovacuum Tuning: How to Stop Table Bloat

PostgreSQL autovacuum tuning in practice: how the trigger thresholds work, per-table settings for big tables, cost limits, what blocks vacuum, wraparound and the PostgreSQL 18 changes.

· 13 min read
🏗️ Architecture

Remote DBA Services: What You Actually Get and When They Make Sense

What remote DBA services really include, who needs them, how engagements and pricing models work, how access is handled securely, and the red flags to watch for when choosing a provider.

· 10 min read
🏗️ Architecture

When a Whole Cloud Zone Goes Dark: Database Lessons From the October 2026 Google Cloud Outage

A power failure took a Google Cloud London zone offline for six hours. What the incident teaches about database failover, capacity and cross-zone dependencies.

· 7 min read
🔄 Migrations

MySQL 26.10 and Calendar Versioning: Which MySQL Should You Run in Production?

MySQL now uses year.month version numbers: 26.7, 26.10, and the next LTS in 2028. What changed and how to pick a MySQL version for production.

· 5 min read
🏗️ Architecture

PostgreSQL Connection Pooling with PgBouncer: A Practical Guide

How PostgreSQL connection pooling with PgBouncer works: pool modes, transaction-mode limitations, prepared statements, pool sizing and the metrics to watch.

· 10 min read
🔄 Migrations

PostgreSQL 14 Reaches End of Life on 12 November 2026: What To Do Now

PostgreSQL 14 receives its final update on 12 November 2026, a week before PostgreSQL 19 ships. How to choose a target version and plan the upgrade.

· 7 min read
🏗️ Architecture

PostgreSQL Security Hardening: A Practical Checklist for Production

Most PostgreSQL security incidents come from basic gaps, not clever exploits. A practical hardening checklist: network, authentication, roles, encryption, auditing.

· 8 min read
🔄 Migrations

Moving From Redis to Valkey: What the New Valkey-proxy Changes

Percona announced Valkey-proxy, an open-source proxy for Valkey clusters. What it changes for teams planning to move from Redis, and how to plan the migration.

· 6 min read
🚨 Incident Response

If You Haven't Restored It, It Isn't a Backup

Backups fail quietly and are discovered loudly. How to design database backups around recovery targets — and prove you can restore them.

· 7 min read
🏗️ Architecture

PostgreSQL High Availability with Patroni: What Production Actually Needs

A replica is not high availability. What a production PostgreSQL HA setup with Patroni needs beyond streaming replication — and how to prove it works.

· 6 min read
🔄 Migrations

PostgreSQL Major Version Upgrades: pg_upgrade or Logical Replication?

PostgreSQL 14 reaches end of life in November 2026. pg_upgrade versus logical replication: what each costs in downtime, risk and effort.

· 8 min read
📈 Monitoring

PostgreSQL Slow Queries: A Practical Tuning Checklist

Most slow PostgreSQL databases are slow for the same handful of reasons. The checklist we work through before anyone talks about bigger hardware.

· 8 min read
🏗️ Architecture

Where Your RDS Bill Really Goes — and How to Cut It

Cloud database bills grow quietly. Where Amazon RDS and Aurora spend really comes from, where to look first — and what you should not cut.

· 6 min read
🔄 Migrations

Zero-Downtime PostgreSQL Migrations: A Practical Playbook

"Just take a maintenance window" isn't an acceptable answer anymore. Here's the logical-replication pattern we use to cut over production PostgreSQL clusters without customers noticing.

· 8 min read
📈 Monitoring

The Metrics That Actually Predict a Database Incident

CPU and memory graphs tell you a database is unhealthy after the fact. These five signals — tracked as trends, not snapshots — tell you before your users do.

· 7 min read
🔄 Migrations

MySQL to PostgreSQL: When It's Worth the Migration (and When It Isn't)

"Migrate to Postgres" is popular advice, not universal advice. A practical framework for deciding whether the switch is actually worth the risk for your workload.

· 7 min read
🏗️ Architecture

Building a ClickHouse Data Warehouse From Years of Legacy Data

Most companies are sitting on years of transactional history that's functionally unqueryable. Here's how we design the schema and backfill strategy to make it useful again.

· 8 min read
🚨 Incident Response

What a 15-Minute Database Incident Response Actually Looks Like

A response-time SLA sounds like a marketing line until you break down what has to happen in those 15 minutes — and how much of it was decided long before the alert fired.

· 6 min read

No posts in this category yet — check back soon, or get in touch if you have a question we can answer directly.

Work with us

Have a database problem worth writing about?

Whether you're planning a migration, dealing with a performance issue, or want a senior DBA on retainer — we start with a free 30-minute discovery call.

Get in touch See our case studies