Recent stories
Each story's summary, with the places it was discussed.
Summaries are written by AI from the linked sources. Open the source for full context.
Postgres LISTEN/NOTIFY is often criticized for scalability issues caused by a global exclusive lock during commits.
By buffering notifications and batching them, developers can bypass this serialization bottleneck. This approach enables high-throughput, low-latency streaming—achieving 60K writes per second while maintaining millisecond latency—without sacrificing system reliability or durability.
The engineering team at incident.io improved API performance by reducing P95 latency from 5s to 0.3s.
They solved pagination bottlenecks for large datasets by implementing Bloom Filters in PostgreSQL and enforcing a mandatory 30-day time window for alert history, significantly optimizing query efficiency for high-volume customer data.
pg_vectorsearch is an alpha PostgreSQL extension for high-performance approximate nearest neighbor (ANN) search.
Its PRISM index targets datasets exceeding 100 million vectors, using hierarchical routing, RaBitQ quantization with theoretical error bounds, SIMD-optimized distance computation, and PostgreSQL buffer caching. It supports inserts, updates, deletes, rebalancing through prism_rebalance, and existing pgvector vector or halfvec columns. Two-stage filtering reduces full-precision reranking while preserving recall and improving query and index-building speed.
SQL to ER Diagram is a free, open-source browser-based tool that visualizes SQL schemas as interactive ER diagrams.
It supports PostgreSQL, MySQL, SQLite, and SQL Server, processing DDL locally to ensure privacy. Users can arrange tables, add notes, and export diagrams as PNG or SVG without creating an account.
Durable workflows improve reliability by checkpointing task progress to a database.
While traditional systems use complex external orchestrators, this article proposes building durable workflows directly on Postgres. By leveraging Postgres for state management, coordination, and observability, developers can reduce infrastructure complexity, improve scalability, and unify security policies without adding new single points of failure.
This comprehensive guide to PostgreSQL indexes explores their internal mechanics, storage on disk using heap files and 8KB pages, and the tradeoffs associated with their use.
It details how the query planner decides between sequential and index scans and emphasizes the costs of indexing, including disk space, memory usage, and impact on write operations. The article breaks down various index types, such as B-tree, Hash, BRIN, GIN, GiST, and SP-GiST, while also covering advanced strategies like partial, covering, multi-column, and expression indexes for specialized optimization.
PgDog is an open-source, high-performance PostgreSQL proxy written in Rust.
It offers advanced connection pooling, load balancing, and sharding capabilities. Featuring application-layer routing, health checks, and automatic failover, it supports complex cross-shard queries and online re-sharding. It is designed for scalability on commodity hardware and integrates with Kubernetes, AWS RDS, and Terraform.
Rails 8 introduces a significant architectural shift by removing Redis from its standard technology stack in favor of 'Solid' alternatives.
By utilizing SolidQueue for job processing, SolidCache for caching, and SolidCable for real-time messaging, developers can now rely solely on relational databases like PostgreSQL, MySQL, or SQLite. This change simplifies infrastructure by reducing the operational overhead of managing separate Redis instances, clusters, and backup strategies. SolidQueue leverages modern database features such as FOR UPDATE SKIP LOCKED to ensure efficient, concurrent job handling without lock contention. While Redis remains superior for extreme low-latency requirements or massive throughput, the new 'Redis-less' approach is capable of handling millions of jobs daily, making it an ideal choice for the vast majority of web applications seeking to minimize complexity.
Database indexes speed up read operations by acting like sorted references, similar to a book index.
However, they introduce overhead for writes and storage. Key optimization strategies include understanding composite indexes, using functional indexes for expressions, implementing partial indexes for filtered datasets, and leveraging covering indexes for index-only scans. Always measure performance using EXPLAIN and EXPLAIN ANALYZE.
How Oracle's Secret Algorithm Came into the Public Domain After Patent Expiration, Making Sorting 5x Faster for Open-Source Databases and Boosting Performance for AWS and Other Cloud Companies
Database · MySQL · PostgreSQL
Oracle's Orasort algorithm, which boosts database sorting speeds by comparing 8-byte segments as 64-bit integers instead of character-by-character, has entered the public domain following its 20-year patent expiration.
This efficient method reduces CPU cycle consumption, now enabling open-source databases like MySQL and PostgreSQL to optimize performance and lower operational costs in cloud environments.
Postgres isn't slow, your storage is
Backend · Database · Performance · PostgreSQL · Software Architecture
Sai Srirampur’s POSETTE 2026 benchmark found the same 3.3-billion-row PostgreSQL UPDATE workload achieved median 16,030 TPS on local NVMe versus 1,734 on baseline gp3 EBS, with latency falling from 36.9 ms to 4.0 ms.
EBS spent most extra time waiting for storage, contributing to slow ingestion, read latency, VACUUM, checkpoints, and replication lag. Production use requires two synchronous standbys across availability zones, plus Object Storage base backups and continuous WAL archiving for failover and recovery.
Neki validates its sharded Postgres behavior by treating vanilla Postgres as an oracle: identical queries, data, and protocol interactions must produce identical results or errors.
Differential tests explore plan variants created by changing statistics, planners, sharding topologies, and simple/extended text/binary protocols. Across about 9,800 workload queries, a recent CI run executed 37,000 variants; this exposed real correctness bugs, including incorrect volatile CTE evaluation, while fuzzing found over 70 more bugs.
Designing a reliable unplanned failover
Backend · Database · Distributed Systems · PostgreSQL · Software Architecture
Neki’s unplanned Postgres failover uses replica evidence rather than Admin’s health check alone.
It declares a primary dead only when reachable replicas report broken replication without contradiction, then disconnects them to prevent the old primary from returning and to freeze WAL positions. It promotes the replica with the highest received, preferably fully replayed, WAL, reconfigures the shard, and tears down the old primary. Synchronous `ANY 1` durability helps establish write unavailability, while TCP and WAL receiver timeouts detect silent or frozen failures.
Designing a planned switchover for minimum disruption
Backend · Database · Distributed Systems · PostgreSQL · Software Architecture
Neki minimizes planned Postgres primary switchovers by validating candidates beforehand, establishing a final WAL position, preserving synchronous replication, and buffering primary-bound queries.
Admin makes the old primary read-only, disconnects other replicas, waits for the target to replay all required WAL, prepares replication, and promotes it only when safety checks pass. Routers then replan buffered queries, so applications usually see delay rather than errors. A deadline enables rollback to the old primary, while acknowledged commits remain durable.
Shard design doesn't start from your tables
Backend · Database · Distributed Systems · PostgreSQL · Software Architecture
Neki shard-group design should start from query and transaction patterns, not table structure.
Tables sharing a key can be co-located across Postgres shards using a common shard index, keeping joins and transactions local and preserving full single-shard semantics. Reference tables are replicated to every shard, while differently keyed data can use separate groups. Global secondary indexes support lookups without shard keys. MoveTables and Reshard later change placement, shard keys, or shard counts as workloads evolve.
ON DELETE CASCADE can turn simple deletions into outages and replication failures as foreign-key trees grow.
A cascading delete removes matching rows in one transaction, generating dead tuples, index updates, and WAL while holding locks; migrations may queue writes, unindexed keys can trigger scans, and logical replication can leave orphans or fail without replica identity. Soft deletes avoid this by marking one row, then reaping descendants in small background batches, keeping transactions short and bounded.
Neki update: $50 Metal, read-only replicas, Azure, and more
Backend · Database · DevOps · Distributed Systems · PostgreSQL
Neki, PlanetScale’s sharded Postgres, added read-only replicas, Metal nodes starting at $50/month, Azure regions, and broader Terraform, CLI, MCP, and configuration support during its platform preview.
The query layer now supports more SQL, standard exports via COPY, and EXPLAIN (NEKI_PG_PLAN); distributed INSERT ... SELECT is 76x faster and COPY ingest 5x faster than launch. More than 650 changes have shipped, enabling evaluation for production workloads.
Neki implements PostgreSQL sequences in its sharded query planner by making sequence operations router-only and coordinating allocation through an authoritative shard.
Because nextval() is volatile, Neki must evaluate it once per output row, even when rows arrive from multiple shards, while stable expressions such as now() are evaluated once per statement. Shard-local joins and immutable expressions can still be pushed down. For UPDATE, Neki locks and streams row IDs to the router, then sends parameterized per-row updates with globally unique sequence values.
OpenAI has successfully scaled its PostgreSQL infrastructure to support 800 million users and millions of queries per second for ChatGPT and its API.
Despite a 10x surge in load over the past year, OpenAI utilizes a single-primary architecture on Azure PostgreSQL with nearly 50 read replicas globally. The engineering team implemented extensive optimizations, including offloading read traffic to replicas, using PgBouncer for connection pooling, and employing cache locking to prevent read storms. To manage write-heavy workloads that challenge PostgreSQL's MVCC implementation, OpenAI migrated shardable data to Azure Cosmos DB. This strategy prioritizes operational stability, achieving 99.999% availability while maintaining low latency across distributed regions. Future plans include cascading replication and further migration of write-heavy workloads to specialized sharded systems.
This insightful article explores the inner workings of Oban-py, a Python implementation of the renowned Elixir background job processing library.
The author details how Oban-py leverages PostgreSQL features like FOR UPDATE SKIP LOCKED for concurrency, LISTEN/NOTIFY for real-time signaling, and UPSERT mechanisms for leader election. By centralizing coordination within the database, it eliminates the need for external brokers like Redis. The summary distinguishes between the Open Source version, which utilizes single-threaded asyncio, and the Pro version, which offers true parallelism, bulk operations, and sophisticated rescue heartbeats. Ultimately, it highlights the library's clean software architecture and its effectiveness as a reliable, database-backed solution for managing complex background tasks and job lifecycles in Python environments.