Best of PostgreSQLApril 2026

  1. 1
    Video
    Avatar of codinggopherThe Coding Gopher·5w

    I replaced my entire stack with Postgres...

    PostgreSQL can replace a surprising number of specialized services in a typical tech stack. JSONB with GIN indexes handles NoSQL-style document storage, SELECT FOR UPDATE SKIP LOCKED turns a table into a concurrent job queue, tsvector/tsquery plus pg_trgm power full-text and fuzzy search, and the pgvector extension with HNSW indexes enables vector similarity search alongside relational data. PostGIS covers geospatial queries, declarative partitioning with BRIN indexes handles time-series workloads, materialized views replace basic data warehouse dashboards, and tools like PostgREST or pg_graphql auto-generate APIs directly from the schema. The post acknowledges limits: horizontal sharding at extreme scale and sub-millisecond in-memory caching still warrant specialized tools, but for most applications PostgreSQL alone is a cost-effective, battle-tested foundation.

  2. 2
    Article
    Avatar of databricksdatabricks·6w

    How agentic software development will change databases

    Agentic software development is reshaping database requirements in three key ways: evolutionary branching (agents create and discard database branches rapidly, with some projects reaching 500+ iterations), scale-to-zero economics (half of agentic app databases have compute lifetimes under 10 seconds, making fixed-cost databases unviable), and openness (agents trained on open-source ecosystems like Postgres operate more reliably with open interfaces and storage formats). Databricks's Lakebase addresses these needs with O(1) copy-on-write branching, sub-second scale-to-zero elasticity, and open Postgres page format storage on cloud object storage. A telling data point: AI agents in Lakebase now create roughly 4x more databases than human users.

  3. 3
    Article
    Avatar of hnHacker News·4w

    GitHub - calcom/cal.diy: Scheduling infrastructure for absolutely everyone.

    Cal.diy is a fully MIT-licensed, community-maintained fork of Cal.com with all enterprise and commercial code removed. It provides open-source scheduling infrastructure for self-hosters who want complete control without license keys or proprietary features. Built on Next.js, tRPC, React, Tailwind CSS, and Prisma with PostgreSQL, it supports Docker-based deployment, manual setup, and one-click deploys to Railway, Vercel, Render, and Northflank. The README covers full setup instructions including environment configuration, database migrations, E2E testing with Playwright, and integration guides for Google Calendar, Microsoft 365, Zoom, HubSpot, and more.

  4. 4
    Article
    Avatar of freecodecampfreeCodeCamp·4w

    How to Use PostgreSQL as a Cache, Queue, and Search Engine

    A benchmark-driven exploration of using PostgreSQL as a replacement for Redis (caching), RabbitMQ (job queues), Elasticsearch (full-text search), and pub/sub systems. Two identical PostgreSQL 17 instances are compared — one using naive patterns, one using optimized built-in features like UNLOGGED tables, SKIP LOCKED, tsvector with GIN indexes, and LISTEN/NOTIFY. Key findings: tsvector+GIN delivers a 10x p95 improvement over ILIKE searches; SKIP LOCKED is production-ready for job queues; UNLOGGED tables give a consistent 13% write speedup; LISTEN/NOTIFY reduces pub/sub latency by 20% at p95. Under combined workload, the optimized setup adds ~15% overhead but stays under 10ms p95. The conclusion is that a well-configured PostgreSQL instance can replace 3-5 specialized services for most web applications, with clear guidance on where dedicated tools are still warranted.

  5. 5
    Article
    Avatar of hnHacker News·4w

    GitHub - NikolayS/pgque: PgQue – Zero-bloat Postgres queue. One SQL file to install, pg_cron to tick.

    PgQue is a zero-bloat Postgres message queue implemented in pure PL/pgSQL, requiring no C extensions or external daemons. It revives the battle-tested PgQ architecture (originally built at Skype) and makes it compatible with managed Postgres providers like RDS, Aurora, Supabase, and Neon. Instead of SKIP LOCKED with per-row DELETE/UPDATE (which causes dead tuples and VACUUM pressure), PgQue uses snapshot-based batching and TRUNCATE-based table rotation for zero bloat under sustained load. The trade-off is ~1–2 second end-to-end delivery latency. It supports native fan-out with independent consumer cursors, built-in retry with backoff, dead letter queues, and a language-agnostic SQL API. Client libraries exist for Python, Go, and TypeScript. Benchmarks show ~86k events/sec insert and ~2.4M events/sec consumer read rate with zero dead-tuple growth over 30 minutes.

  6. 6
    Article
    Avatar of freecodecampfreeCodeCamp·5w

    How Database Indexes Work – A Practical Guide with PostgreSQL Examples

    A practical guide to database indexes in PostgreSQL covering how B-tree indexes work internally, how to create single-column, composite, partial, expression, and unique indexes, and how to use EXPLAIN ANALYZE to measure query performance. Also covers other index types (Hash, GIN, GiST, BRIN), index management (listing, sizing, finding unused, dropping, rebuilding), common mistakes that prevent index usage (function wrapping, type casting, leading wildcards, low selectivity), and best practices for indexing deliberately based on actual query patterns.

  7. 7
    Article
    Avatar of lobstersLobsters·5w

    GitHub - xataio/xata: Open source, cloud native, Postgres platform with copy-on-write branching and scale-to-zero

    Xata has open-sourced its cloud-native Postgres platform, previously powering its managed cloud service. Built on Kubernetes using CloudNativePG and OpenEBS, it offers copy-on-write branching (enabling TB-scale Postgres copies in seconds), scale-to-zero compute, auto-scaling, high availability, PITR backups, and a serverless SQL driver over HTTP/WebSockets. Primary use cases are internal Postgres-as-a-Service platforms and ephemeral dev/preview/test environments. The platform requires a Kubernetes cluster and is not recommended for single-instance deployments. Licensed under Apache 2.0.

  8. 8
    Article
    Avatar of vercelVercel·6w

    Query and manage Marketplace databases from the dashboard

    Vercel now lets developers run SQL queries, view and edit table data, and inspect database schemas directly from the Vercel dashboard. The feature supports marketplace integrations including AWS Aurora Postgres, Neon, Prisma, and Supabase. Three new tabs are added to the integration resource page: Query (run SQL, export as CSV/JSON/Markdown), Data Editor (spreadsheet-like row editing with atomic commits), and Schema (visual graph of tables and relations). Currently available to users with Owner permissions.

  9. 9
    Article
    Avatar of bytebytegoByteByteGo·7w

    How Datadog Redefined Data Replication

    Datadog's Metrics Summary page suffered 7-second p90 latency due to expensive joins on 82K metrics against 817K configurations in Postgres. The root cause was using a transactional database for search workloads. The solution was Change Data Capture (CDC) using Debezium to stream Postgres WAL changes into Kafka, then into a dedicated search platform. Datadog chose asynchronous replication for resilience at scale, accepting brief replication lag as a tradeoff. To handle schema evolution safely, they built automated SQL validation and a Kafka Schema Registry enforcing backward compatibility with Avro serialization. Finally, they used Temporal to automate pipeline provisioning end-to-end, turning a one-off fix into a company-wide data replication platform supporting Postgres-to-Postgres, Postgres-to-Iceberg, Cassandra, and cross-region Kafka pipelines.

  10. 10
    Article
    Avatar of supabaseSupabase·6w

    AI Agents Know About Supabase. They Don't Always Use It Right.

    Supabase has released Agent Skills, an open-source set of instructions that teach AI coding agents how to use Supabase correctly. The problem: agents already know about Supabase from training data, but they make critical mistakes — skipping RLS policies, hallucinating CLI commands, creating views without security_invoker=true, and ignoring up-to-date docs. The skill is a ~100-line SKILL.md file covering four areas: documentation access (teaching agents to fetch current docs via MCP, curl, or web search), security (inline checklist of RLS and auth gotchas), tooling (CLI --help discovery and MCP troubleshooting), and schema management (direct SQL edits during dev, then formalize migrations). Testing across Claude Code and Codex showed consistent improvement when using MCP + Skill vs. baseline or MCP alone, with task completion rates rising from 42-71% to 67-88%. Key insight: the bottleneck is context, not capability — agents knew how to implement security_invoker correctly when the skill was loaded, they just didn't know when to apply it.

  11. 11
    Article
    Avatar of googleossGoogle Open Source Blog·7w

    Google Cloud: Investing in the future of PostgreSQL

    Google Cloud engineers summarize their PostgreSQL upstream contributions from July–December 2025. Key work includes automatic conflict detection for active-active replication, logical replication of sequences, a self-deadlock fix in DROP SUBSCRIPTION, pg_upgrade optimizations for large objects and logical slots, and several bug fixes in pgstattuple, dynamic library loading, and WAL flush functions. The team is also developing a conflict log table, parallel pg_dump for large tables, and pipe-based parallel export. Dilip Kumar was selected for the PGConf.dev 2026 Program Committee.

  12. 12
    Article
    Avatar of pganalyzepganalyze·5w

    Waiting for Postgres 19: Reduced timing overhead for EXPLAIN ANALYZE with RDTSC

    Postgres 19 introduces a significant reduction in EXPLAIN ANALYZE timing overhead by switching from the RDTSCP CPU instruction to RDTSC for instrumentation measurements. RDTSCP serializes instruction execution (blocking out-of-order execution), while RDTSC does not, resulting in roughly 50% lower per-measurement overhead. In practice, a COUNT(*) over 50M rows that took ~800ms with the old system clock source now takes ~355ms with the new TSC clock source. A new `timing_clock_source` setting (values: auto, system, tsc) lets users control this behavior. The change makes it practical to enable `auto_explain.log_timing` on more production workloads, reducing average overhead from 5-10% down to roughly 2-3%. The feature targets x86-64 initially; ARM support has outstanding issues. It was committed to the Postgres 19 development branch and is expected in the September/October 2025 release.

  13. 13
    Article
    Avatar of newstackThe New Stack·5w

    Why Postgres wants NVMe on the hot path, and S3 everywhere else

    Postgres commit durability requires WAL flushes that block until the kernel confirms the write is durable. On NVMe this takes tens of microseconds; on object storage like S3 it can be orders of magnitude slower. This latency difference directly caps OLTP throughput, especially at lower concurrency where group commit doesn't help. MVCC internals (tuple versioning, full-page writes, vacuum, hint bits) further amplify small scattered I/O, making fast local storage essential on the hot path. S3 excels at WAL archiving, base backups, snapshots, and feeding analytics pipelines — jobs that don't touch the commit path. PostgreSQL 18's async I/O improvements are designed to drive fast local storage harder, not to close the gap with object storage. The recommended architecture keeps NVMe (or fast block storage) on the commit and cache-miss path, and pushes cold, reconstructable state to S3.

  14. 14
    Article
    Avatar of trendyoltechTrendyol Tech·5w

    Self-Service Database Mobility: How We Built Trendyol’s Internal PostgreSQL Migration Platform

    Trendyol's Database Platform team built a self-service PostgreSQL migration platform using Temporal.io to replace manual, DBA-intensive migration scripts. The platform addresses key challenges including WAL bloat, sequence synchronization, replication slot continuity, and safe cutover mechanics. It uses a hybrid pg_dump + logical replication approach with parallel restore, DDL safeguards via event triggers, and intentional human approval gates at critical decision points. The result is a system where teams can trigger migrations autonomously while DBAs retain strategic oversight, reducing migration time from days or weeks of constant attention to a largely automated process.

  15. 15
    Article
    Avatar of supabaseSupabase·7w

    100,000 GitHub stars

    Supabase has reached 100,000 GitHub stars and now serves 8 million developers. Founded in 2020 with just two people and a Postgres database, the team reflects on their open-source philosophy of supporting existing tools and communities rather than building everything from scratch. Key open-source projects powering the platform include Postgres, PostgREST, pgvector, Deno, imgproxy, and Elixir Phoenix Framework. The milestone is framed as a community achievement, with future goals centered on making Postgres the default database for every new project on the internet.

  16. 16
    Article
    Avatar of bytebytegoByteByteGo·6w

    Nextdoor’s Database Evolution: A Scaling Ladder

    Nextdoor's engineering team evolved their database architecture through a series of deliberate scaling steps. Starting from a single PostgreSQL instance, they added PgBouncer for connection pooling to address the process-per-connection bottleneck. They then introduced primary-replica architecture with time-based dynamic routing to handle read-heavy traffic while maintaining read-your-own-writes consistency. A Valkey (Redis-compatible) look-aside cache with MessagePack serialization and Zstd compression was layered on top for speed. To prevent stale cache data, they implemented a versioning system using PostgreSQL triggers and atomic Lua scripts for compare-and-set updates. Finally, Debezium-based Change Data Capture provides a self-healing reconciliation mechanism. Sharding by neighborhood ID represents the final scaling tier for write-heavy growth.

  17. 17
    Article
    Avatar of clickhouseClickHouse·3w

    What's New in pg_clickhouse - JSONB Support, SQL value functions, Streaming, and more

    pg_clickhouse, the PostgreSQL extension for querying ClickHouse databases, has received several notable updates. Version 0.1.10 added JSONB accessor operator and function pushdown (including ->, ->>, jsonb_extract_path, jsonb_extract_path_text) that translates to ClickHouse sub-column syntax. Version 0.2.0 improved pushdown for SQL date/time value functions like CURRENT_DATE, CURRENT_TIMESTAMP, clock_timestamp(), and others, ensuring timezone-aware translation to ClickHouse equivalents. Array function pushdown was also added, mapping Postgres functions like array_cat, array_to_string, and string_to_array to their ClickHouse counterparts. Additionally, HTTP result set streaming was introduced, buffering ~50MB at a time instead of loading entire result sets into memory — reducing peak memory usage from 600MB+ to under 86MB when querying large datasets like NYC taxi data.

  18. 18
    Article
    Avatar of databricksdatabricks·6w

    Database Branching in Postgres: Git-Style Workflows with Databricks Lakebase

    Databricks Lakebase introduces database branching for Postgres, enabling Git-style isolated environments without full data copies. Using a copy-on-write, compute-storage-separated architecture, branches are created in seconds regardless of database size. Common patterns include one branch per developer, per pull request, per CI test run, and for instant point-in-time recovery. Non-production branches auto-scale to zero when idle, making it economical to create and discard them freely. The CLI, console, or API can provision a branch in under a minute.

  19. 19
    Article
    Avatar of hnHacker News·6w

    pgit: I Imported the Linux Kernel into PostgreSQL

    pgit, a Git-like CLI that stores repository history in PostgreSQL using delta compression, successfully imported the entire Linux kernel history: 1,428,882 commits, 24.4 million file versions, and 20 years of development in 2 hours on a Hetzner dedicated server. The resulting 6.6 GB PostgreSQL database (2.7 GB actual data) enables SQL queries across the full history in seconds. Analysis reveals: 38,506 unique authors with 25:1 contributor-to-committer ratio, 90% of commits touching 5 or fewer files, Intel i915 and Btrfs as the most tightly coupled subsystems, David S. Miller merging 7.9% of all commits, Intel leading corporate contributions, and quirky findings like 7 f-bombs in commit messages (from 2 people), 665 bug fixes pointing to the initial git import commit, and bcachefs taking 13 years to merge into mainline.

  20. 20
    Article
    Avatar of neontechNeon·6w

    Neon works with Stripe Projects for agentic provisioning

    Neon is joining the developer preview of Stripe Projects as a co-design partner, enabling AI coding agents and developers to provision real Postgres databases directly from the terminal via CLI commands. Running `stripe projects add neon` creates a Neon account, provisions a database, and returns connection credentials to the environment automatically. The integration addresses a key gap in agentic workflows: agents could write code but couldn't autonomously set up real infrastructure. Neon is positioned as ideal for this use case due to its 350ms spin-up time, free tier with no card required, scale-to-zero billing, and Postgres compatibility.

  21. 21
    Video
    Avatar of codingwithlewisCoding with Lewis·4w

    What a Billion Database Rows Look Like in Real Life

    A visual and conceptual exploration of what database scale looks like in physical terms. Starting from 50 rows on a single sheet of paper, the post scales up to a billion rows — equivalent to a two-kilometer-tall stack — and compares that to real-world data volumes from Spotify, Uber, and Facebook. Along the way, it explains core database concepts like indexes and joins using paper-stack analogies, illustrating why Postgres can retrieve a single row from billions in milliseconds. The post is sponsored by Supabase.

  22. 22
    Article
    Avatar of depeszdepesz·4w

    Waiting for PostgreSQL 19 – Add CONCURRENTLY option to REPACK – select * from depesz;

    PostgreSQL 19 is gaining a CONCURRENTLY option for the REPACK command, allowing table repacking (to reclaim bloat) without holding an access-exclusive lock for the entire operation. The lock is only needed at the final relfilenode swap. A practical test on a 200M-row table (19 GB with 80% bloat) showed the table shrinking to ~4 GB in about 65 seconds, with concurrent inserts experiencing only moderate slowdown (average latency rising from 1.5ms to 5.5ms) rather than being blocked entirely. Known limitations include replication slot consumption, only one concurrent REPACK at a time system-wide, and a deadlock risk during the final lock upgrade phase — all slated to be addressed in follow-up commits.

  23. 23
    Video
    Avatar of webdevcodyWeb Dev Cody·6w

    Pivoting my game into an MMO Action RPG

    A developer pivots their wave-based multiplayer survival game 'Survive the Night' into an MMO Action RPG, using AI coding agents (Cursor Composer) to implement major changes. The session covers adding user authentication requirements, a persistent XP/leveling system backed by PostgreSQL, open-world zombie spawn points with respawn timers, inventory system refactoring to unify resource bags and inventory slots, and removal of ~6,000 lines of legacy code including wave systems, game modes (Battle Royale, infection), and environmental events like lightning and toxic gas. The developer runs multiple concurrent AI agents to handle different tasks simultaneously and reflects on the workflow of using AI agents for game development.

  24. 24
    Article
    Avatar of phoronixPhoronix·7w

    AWS Engineer Reports PostgreSQL Performance Halved By Linux 7.0, But A Fix May Not Be Easy

    An AWS engineer discovered that the Linux 7.0 development kernel cuts PostgreSQL throughput roughly in half on Graviton4 hardware. The regression was traced to Linux 7.0 restricting available kernel preemption modes, causing significantly more time spent in user-space spinlocks. A patch was proposed to restore PREEMPT_NONE as the default, but kernel maintainer Peter Zijlstra pushed back, arguing the proper fix is for PostgreSQL to adopt the Restartable Sequences (RSEQ) time slice extension introduced in Linux 7.0. If the patch is rejected, PostgreSQL users could face major performance degradation when Linux 7.0 stable ships in approximately two weeks.

  25. 25
    Article
    Avatar of atomicobjectAtomic Spin·5w

    K3s: A Better Way to Deploy a Docker App to a Linux Server

    A step-by-step guide to deploying a Dockerized web app on a single Linux server using K3s (lightweight Kubernetes), Helm, Zot (private OCI registry), and CloudNativePG. The guide walks through installing a single-node K3s cluster, setting up a private container registry with Zot, deploying a managed PostgreSQL instance via the CloudNativePG operator, and packaging the app as a Helm chart with automatic database wiring. The full stack runs on 2–4GB RAM and provides a scalable, standards-based alternative to ad-hoc deployment methods like Docker Compose or systemd services.