Why you shouldn't do application-level sharding
Application-level sharding of an OLTP database looks simple on day one (a `shard_for(user_id % N)` function) but accumulates serious engineering burdens as a system grows.
Topics Data & databases
Evolving schemas and migrating data safely.
Search within Schema migrations, or combine it with other topics →
Application-level sharding of an OLTP database looks simple on day one (a `shard_for(user_id % N)` function) but accumulates serious engineering burdens as a system grows.
Sentry Conventions is a superset of OpenTelemetry Semantic Conventions that defines attribute names, types, scrubbing policies, deprecation chains, span ops, span naming rules and metric specs across Sentry's ~100 SDKs, its Relay ingestion service, Snuba querying and the product UI.
PlanetScale's open-source Heroku Migrator moves multi-terabyte Postgres databases off Heroku standard plans, which lack WAL access and logical replication, by using Bucardo trigger-based replication: triggers record changes in delta tables, a one-time COPY loads existing data, and a worker replays the backlog before a controlled switchover with verification.
Turso Cloud's paid plans no longer meter active databases, so a database costs only its storage while idle.
Postgres ON DELETE CASCADE turns a single-row delete into an unbounded transaction that can cause outages at scale.
Supabase preview branches are separate projects that become ready in about 20 seconds (median) by running three mostly parallel workflows: copying configuration, applying migrations, and deploying Edge Functions.
Supabase replaced migra with pg-delta, its own open-source Postgres diff engine, as the generator behind declarative schema migrations in the Supabase CLI. pg-delta loads schema files and migration history into two shadow databases, diffs them by reading the system catalog, and orders output with a catalog-derived dependency graph.
Clera moved a 500 GB, 500+ table production Postgres database from the EU to the US overnight onto ClickHouse Managed Postgres, with production traffic still running, using two parallel ClickPipes pipelines.
A rollout of Railway's distributed routing control plane deployed a new routing service binary before its required database schema migration finished, because the two ran in parallel pipelines after the control plane was split out of the monolith.
Wix's large live-system migrations dropped from months or years to weeks mainly by tackling recurring problems before the migration starts, not through new tooling.
Storage version migration (SVM) is GA and enabled by default in Kubernetes v1.37, adding the built-in StorageVersionMigration API (storagemigration.k8s.io/v1) and a control-plane controller that rewrites stored objects to the current storage version.
Neon Labs launches with two experimental tools for major Postgres version upgrades on Neon, where pg_upgrade isn't supported and an upgrade means migrating into a new project.
The Neon CLI is renamed from neonctl to neon (old name kept as an alias) and gains a branch-first workflow built on `neon link`, `neon checkout` and `neon env pull`, which store project/branch context in a local .neon file and rewrite only Neon-managed env vars.
SQLite, especially via Turso Cloud, can replace PostgreSQL or MySQL for read-heavy, moderate-write workloads, trading complex-JOIN optimization, stored procedures, rich types and native replication for simpler operations, lower cost and local reads.
Cockroach Labs has made its CockroachDB Kubernetes Operator generally available.
Datadog migrated Stream Router, the control plane that tells metrics producers and queriers which Kafka cluster, topic and partitions to use, from a FoundationDB key-value model to a relational schema.
Spyne replaced a self-managed Debezium → Kafka → ClickHouse Kafka-engine/materialized-view CDC pipeline with ClickPipes on ClickHouse Cloud.
Open Electricity moved the analytical workload behind its public Australian energy API from Postgres/TimescaleDB to ClickHouse, keeping relational data in Postgres.
Palantir's Gotham document store rebuilds Elasticsearch indices from its transactional database (the source of truth) rather than using Elasticsearch's _reindex API, so search keeps serving live traffic throughout.
Slack replaced four conflicting desktop/mobile notification preference systems with one unified model that separates what to be notified about (All new posts, Mentions, Mute) from how notifications arrive (independent desktop and mobile push toggles).
PeerDB migrated a 1TB, 3.6-billion-row Postgres table in about 1 hour 50 minutes with 8 threads, compared with 8 hours 40 minutes for native logical replication and 17 hours for pg_dump/pg_restore.
Modem, a startup building an AI agent that centralizes user feedback from Slack, Discord and GitHub, uses Neon Postgres branching as its development workflow.
ClickPy, ClickHouse's free PyPI download analytics service, now holds over 2.2 trillion rows, and its cron-based ingestion script was replaced with ClickPipes without downtime.
Neon migrated thousands of user accounts and more than 10M projects from user ownership to organization (team) ownership with no downtime, no breaking API changes, no API key rotation and no customer action.
Serverless functions and container platforms differ in execution model, which changes how you handle deploys, database access, cron jobs, rollbacks and long-running work.
Running pgvector well depends on hosting that allows extension and configuration control, migrations wired into the deploy pipeline, and the right index choice.
Staging databases drift from production continuously in three ways: data drift (stale dumps, sequence values that diverge so the same ID points to different records), schema drift (hotfixes, skipped migrations, mismatched indexes and extensions causing query plan divergence), and transformation drift (anonymization that breaks uniqueness, referential integrity and determinism).
A schema migration adding a nullable column to a ~1 billion row PostgreSQL table stalled behind locks held by a long-running query.
Neon's copy-on-write storage makes Postgres database branches instant and cheap: each branch shares the parent's base data, gets its own autoscaling compute that scales to zero, and can be created from any point within the history retention window.
A snapshot-based workflow for promoting Postgres schema and data changes uses two isolated root branches, prod and dev, linked only through Neon snapshots.
Anything's Max coding agent gets a dedicated Neon database branch for every session, created in about 200 ms. The agent runs its migrations there and merges back into development atomically through Neon's restore API.
Datadog grew a single Postgres-to-search replication pipeline into a multi-tenant CDC platform built on Debezium, Kafka, and Kafka Connect.
A schema migration that added an indexed column to a ~1 billion-row Postgres table without `CREATE INDEX CONCURRENTLY` took an exclusive table lock, queuing nearly all backend API queries and taking down Railway's dashboard, CLI, Public API and GitHub webhook deploys for about 40 minutes.
Postgres 18 is available in preview on Neon's Free plan, and production upgrades should wait until it leaves preview.
A schema change removing an unused column was partially reverted by a later code change, breaking a core API and leaving Railway's project canvas stuck loading.
SQLite re-parses the entire sqlite_schema table after every ALTER TABLE, so schema changes cost time proportional to total schema size even when only one table is touched.
Six explicit Postgres rules, drawn from building the wispbit review bot, let an LLM code reviewer or coding agent catch common migration and query mistakes before production.
Separate Supabase projects for development and production, with all schema changes captured as timestamped SQL migrations in a Git-tracked supabase/ directory, keep a fast workflow from breaking live data.
Postgres event triggers, transactional DDL and LISTEN/NOTIFY can turn schema changes into reliable events that drive downstream automation such as SDK generation, warehouse syncs and documentation updates, with no external queue.
Hugging Face moved 500,000 repositories and about 20 PB from Git LFS to its Xet content-addressed storage with almost no user disruption.
ClickStack, ClickHouse's open-source observability stack, adds beta support for ClickHouse's native JSON column type for OpenTelemetry attribute columns in place of Map.
Neon now supports Postgres event triggers through the neon_superuser role, and they behave exactly as in vanilla Postgres.
Datadog is splitting its large shared Postgres database into independently owned instances through a three-phase plan: logical separation into per-domain private schemas with explicit ACLs, access reduction so only owning teams query their tables directly, and physical separation onto managed OrgStore instances.
Database-per-tenant schema migrations can scale to millions of databases by inverting control: a hosted schema registry stores a versioned catalog of SQL scripts, and each client periodically reports its schema version, pulls the missing migrations and applies them locally.
Postgres 17 is now available on Heroku Postgres, along with five new `heroku pg:upgrade:*` CLI subcommands (prepare, run, cancel, dryrun, wait) that expose Heroku's internal upgrade automation for self-service major-version upgrades.
Kami's Postgres event tracking (Rails writing JSONB rows, queried via Redash) collapsed when COVID pushed weekly events from about 80M to nearly 2B.
Squarespace migrated many PostgreSQL databases to CockroachDB without write downtime by streaming changes through a CDC pipeline: pgoutput logical decoding feeds per-table Debezium connectors into Kafka (Avro), and per-table Apache Beam pipelines on Dataflow upsert batched events into CRDB with checkpointing and backpressure.
SoundCloud's public API is deprecating its numeric `id` field because resource IDs for tracks, playlists, users and comments will soon exceed the 32-bit integer limit.