Best of PostgreSQL2025

  1. 1
    Article
    Avatar of bytebytegoByteByteGo·1y

    EP150: 12 Algorithms for System Design Interviews

    Learn about 12 key algorithms used in system design interviews, including Bloom Filter, Geohash, and Consistent Hashing. Understand the workings of Kubernetes, an open-source container orchestration platform, and explore the architecture of PostgreSQL, the popular database system. Additionally, discover important tips for API security.

  2. 2
    Video
    Avatar of fireshipFireship·1y

    I replaced my entire tech stack with Postgres...

    Modern web development often involves using multiple tools, leading to high costs and complexity. However, PostgreSQL, a powerful relational database, can handle many tasks typically outsourced to other services. It offers advanced data types, support for unstructured data, extensions for cron jobs, in-memory caching, vector storage, GraphQL, real-time syncing, authentication, analytics, and more. The post emphasizes critically choosing the right tools and showcases how PostgreSQL can simplify full stack application development.

  3. 3
    Article
    Avatar of strongdmstrongdm·46w

    PostgreSQL vs. MySQL: Differences for Tech Leaders & Teams

    PostgreSQL excels at complex, write-heavy workloads with advanced SQL features, rich data types like JSONB, and strict ACID compliance, making it ideal for financial systems and analytics. MySQL prioritizes speed and simplicity for read-heavy applications, offering lightweight architecture perfect for web apps, CMSs, and MVPs. PostgreSQL provides superior extensibility, query optimization, and enterprise features, while MySQL delivers faster performance for simple queries and lower resource consumption. The choice depends on workload complexity, data consistency requirements, and scalability needs.

  4. 4
    Article
    Avatar of vladmihalceaVlad Mihalcea·25w

    Just Use Postgres!

    A comprehensive review of Denis Magda's book covering PostgreSQL's capabilities beyond traditional relational features. The 402-page guide explores core database concepts like indexing (B+Tree, hash, partial), transactions, and modern SQL features (CTEs, window functions), then dives into non-relational capabilities including JSON storage and full-text search. The book examines PostgreSQL's extension ecosystem: pgvector for ML/GenAI embeddings, TimescaleDB for time series data, PostGIS for geospatial queries, and pgmq for message queues. Includes performance tuning guidance and discusses when PostgreSQL might not be the right choice.

  5. 5
    Article
    Avatar of freecodecampfreeCodeCamp·40w

    How to Design Structured Database Systems Using SQL [Full Book]

    A comprehensive guide covering database fundamentals, from basic data concepts to designing structured database systems. Explores the DIKW pyramid (Data, Information, Knowledge, Wisdom), database management systems architecture, ACID properties, and various data models including relational databases, NoSQL systems, and Big Data approaches. Includes practical examples using PostgreSQL and covers essential topics like data types, domains, database design principles, and the differences between structured, semi-structured, and unstructured data.

  6. 6
    Article
    Avatar of communityCommunity Picks·1y

    7 Crucial PostgreSQL Best Practices

    PostgreSQL is a powerful relational database management system. To ensure optimal performance, security, and maintainability, follow best practices such as consistent naming conventions, appropriate schema design, efficient indexing and querying, proper access control, comprehensive backup strategies, routine maintenance and monitoring, effective database version control, and high availability configurations. Regularly review and update these practices, document deviations, and stay informed about PostgreSQL updates to build a robust database infrastructure.

  7. 7
    Article
    Avatar of programmingdigestProgramming Digest·49w

    How Databases Store Your Tables on Disk

    Databases store tables using a hierarchical structure of pages and heap files. Data is organized in fixed-size pages (typically 8KB-16KB) that contain multiple rows, with databases reading entire pages rather than individual rows for efficiency. Tables are stored in heap files where pages can be unordered, making full table scans expensive. Indexes solve this by creating separate B-tree structures that point to specific pages in the heap, dramatically reducing I/O operations. Clustered indexes physically organize table data based on the index key, with databases like MySQL's InnoDB storing all tables as clustered indexes by default. The choice of primary key affects performance significantly, as random values like UUIDs can cause page splits and fragmentation.

  8. 8
    Article
    Avatar of communityCommunity Picks·1y

    Making Beautiful API Keys

    Developers are often dissatisfied with the aesthetics and usability of conventional API keys. A startup focused on developer-first solutions created a new package called 'uuidkey' to solve this problem. This package encodes UUIDv7 using Crockford Base32 and adds dashes for symmetry and readability. These keys are secure, globally unique, sortable, and more visually appealing. The keys are also performant in PostgreSQL and designed for easy implementation.

  9. 9
    Article
    Avatar of francofernandoThe Polymathic Engineer·1y

    Database sharding case study: PostgreSQL

    Notion's engineering team faced significant challenges in scaling their monolithic PostgreSQL database due to rapid user base growth. They decided to implement database sharding, with the Block table and related tables being sharded using Workspace ID as the key. The migration involved a double-write phase and verification to ensure data integrity. Despite some lessons learned, such as the importance of starting early and aiming for zero downtime, the outcome was a more scalable and faster system for Notion's users.

  10. 10
    Article
    Avatar of communityCommunity Picks·1y

    Online SQL Playground for MySQL, PostgreSQL, and SQL Server

    RunSQL is an online SQL playground designed for learning, testing, and sharing SQL queries for MySQL, PostgreSQL, and SQL Server. Users can easily create and manipulate database schemas using DBML, collaborate on SQL projects, conduct interviews, and create web-based database documentation without needing local database setup. It provides a shared environment tailored for developers and data analysts.

  11. 11
    Article
    Avatar of architectureweeklyArchitecture Weekly·1y

    PostgreSQL JSONB - Powerful Storage for Semi-Structured Data

    PostgreSQL JSONB offers a powerful method for storing and querying semi-structured data. JSONB stores data in a binary format, allowing for efficient indexing and querying without the need for repeated parsing. The article discusses the internal structure of JSONB, performance benefits, and various indexing strategies like GIN and B-Tree to optimize JSONB queries. It also covers practical applications, such as using JSONB for managing heterogeneous data models and ensuring query performance. Although JSONB provides flexibility, it's essential to understand its performance implications for large datasets.

  12. 12
    Article
    Avatar of neontechNeon·41w

    the future of real-time UI

    TanStack DB paired with ElectricSQL enables developers to build real-time, reactive UIs with minimal complexity. ElectricSQL uses Postgres logical replication to detect database changes and push updates to clients, while TanStack DB handles optimistic mutations and client-side state management. This combination eliminates the need for custom WebSocket logic and allows Postgres to serve as the single source of truth for real-time updates, making collaborative and multi-device applications more accessible to developers.

  13. 13
    Video
    Avatar of wdsWeb Dev Simplified·1y

    Build A Course Platform LMS With Next.js 15, React 19, Stripe, Drizzle, Shadcn, Postgres

    The post provides a detailed tutorial on how to build a course platform LMS using Next.js 15, React 19, Stripe, Drizzle, and Postgres. The platform allows users to purchase individual courses or bundles, with functionalities for signing in, processing payments, viewing purchase histories, and marking course progress. The admin side includes dashboards to manage sales, refunds, courses, and products. Key practices include setting up databases with Drizzle, using the canary version of Next.js for the latest features, and integrating Clerk for user management. This comprehensive guide also covers best practices and the technical reasons behind various coding choices.

  14. 14
    Article
    Avatar of testdrivenTestDriven.io·44w

    Developing a Real-time Dashboard with FastAPI, Postgres, and WebSockets

    A comprehensive tutorial demonstrating how to build a real-time inventory tracking dashboard using FastAPI, PostgreSQL, and WebSockets. The guide covers setting up database triggers with LISTEN/NOTIFY for automatic change detection, implementing WebSocket connections for live data streaming, creating RESTful API endpoints for inventory management, and building a responsive frontend that updates instantly when data changes occur.

  15. 15
    Video
    Avatar of asaprogrammerAs a Programmer·48w

    Build a Full Stack Mobile App with React Native & Expo - React Native Tutorial

    A comprehensive tutorial covering the development of a full-stack recipe search mobile app using React Native and Expo for the frontend, with a Node.js/Express backend connected to a PostgreSQL database. The tutorial walks through building authentication with Clerk, implementing CRUD operations with Drizzle ORM, deploying the API to Render, and setting up cron jobs to prevent server inactivity. The mobile app features user authentication, recipe search, favorites functionality, and multiple color themes, demonstrating cross-platform development principles and best practices for production deployment.

  16. 16
    Article
    Avatar of supabaseSupabase·47w

    Build a Personalized AI Assistant with Postgres

    A comprehensive guide to building a personalized AI assistant using PostgreSQL as the backbone for long-term memory and data management. The system combines LLMs with a scoped database schema, scheduled tasks via pg_cron, vector search using pgvector, and external integrations through Zapier MCP. Key features include three-layer memory architecture (message history, semantic search, structured data), autonomous scheduling capabilities, and secure database access controls. The tutorial covers practical use cases like run tracking, meal planning, and feedback analysis, with complete implementation steps using Supabase, OpenAI, and Telegram. Total monthly operating costs are estimated at around $0.54 for moderate usage.

  17. 17
    Article
    Avatar of minersThe Miners·41w

    How To Solve Every Programming Problem

    A systematic approach to solving programming problems using a four-step methodology: understand the problem, devise a plan, carry out the plan, and look back. The article demonstrates this process through a practical example of implementing parking reservation validation with capacity limits, showing how to break down complex problems into manageable steps and validate each solution component.

  18. 18
    Video
    Avatar of codingwithlewisCoding with Lewis·1y

    How Notion Handles 200 BILLION Notes (Without Crashing)

    Notion has managed its rapid growth by adopting sharding to distribute its data across many smaller databases. Initially using a single Postgres database, they experienced slowdowns and shifted to sharding their block model. They later built their own data lake using AWS S3, Apache Spark, and other open-source tools to handle their data processing needs effectively. By reorganizing and scaling up their infrastructure, Notion maintained performance and avoided service interruptions for users.

  19. 19
    Video
    Avatar of kikisbytesKiki's Bytes·27w

    How Figma Scaled To 10 Million Users

    Figma scaled from a single PostgreSQL database to a horizontally sharded architecture supporting 10 million users. The journey involved three phases: immediate relief through vertical scaling, read replicas, and connection pooling; medium-term stability via logical partitioning of table groups into dedicated databases; and long-term scalability through horizontal sharding with a custom query router. Key innovations included optimized logical replication by removing indexes during migration, two-phase deployment using PG Bouncer for safe routing changes, logical sharding with PostgreSQL views for testing before physical splits, and a custom Golang DB proxy for intelligent query routing across shards.

  20. 20
    Article
    Avatar of swizecswizec.com·1y

    I was wrong about databases

    The post discusses misconceptions about database performance with arrays and clarifies how PostgreSQL handles wide table rows using TOAST records and tombstones. It emphasizes the importance of measuring performance based on specific data access patterns, noting that modern SSDs make data packing less critical.

  21. 21
    Article
    Avatar of hnHacker News·42w

    Making Postgres 42,000x slower because I am unemployed

    A developer systematically degrades PostgreSQL performance by 42,000x through configuration changes alone, exploring how various postgresql.conf parameters affect database speed. The experiment reduces buffer cache size, forces excessive autovacuum operations, maximizes WAL overhead, disables index usage through cost manipulation, and bottlenecks I/O to a single thread. Starting from 7,082 TPS with default settings, the final configuration achieves less than 0.1 TPS with only 11 successful transactions in 120 seconds across 100 connections.

  22. 22
    Video
    Avatar of javascriptmasteryJavaScript Mastery·1y

    Build and Deploy a Fullstack App with Admin Dashboard | Next.js, PostgreSQL, Redis, Auth.js

    This post guides you through building and deploying a production-grade University Library management system using Next.js, PostgreSQL, Redis, and Auth.js. The project consists of two interconnected applications within a monorepo architecture, teaching industry-standard practices such as rate limiting, DDoS protection, caching, database queries, multimedia uploads, and automated workflows. Technologies like Tailwind CSS, Drizzle ORM, and ImageKit are used to create a polished and scalable application, catering to both user-facing and admin interfaces.

  23. 23
    Article
    Avatar of supabaseSupabase·24w

    Introducing Supabase for Platforms

    Supabase launches a white-label platform offering that enables companies to provision and manage fully managed backends for their users. The service includes database, auth, edge functions, storage, and realtime capabilities, with features like zero-scaling compute instances, embedded dashboard components via Platform Kit, and project transfer capabilities. AI builders like Lovable and Bolt.new are already using it to create millions of projects. Platforms can manage infrastructure centrally or let users bring their own Supabase accounts through OAuth integration.

  24. 24
    Article
    Avatar of taiTowards AI·1y

    End-to-End Data Engineering System on Real Data with Kafka, Spark, Airflow, Postgres, and Docker

    The post provides a detailed guide on building an end-to-end data engineering system using Kafka for data streaming, Spark for data transformation, Airflow for orchestration, PostgreSQL for storage, and Docker for setup and deployment. It is structured into two phases: the first focuses on constructing the data pipeline, while the second will cover creating an application to interact with the database using language models. This project is particularly suited for beginners to data engineering, aiming to deepen their practical knowledge of handling data systems.

  25. 25
    Article
    Avatar of supabaseSupabase·44w

    Supabase UI: Platform Kit

    Supabase has launched Platform Kit, a new set of UI components designed for building platforms on top of Supabase infrastructure. The kit includes database, storage, authentication, and AI components that help developers create platforms providing Postgres databases to end users. Built with shadcn/ui compatibility and Tailwind CSS, these components are fully customizable and target the growing trend of companies using Supabase as Platform-as-a-Service infrastructure, particularly AI builders who now represent 30% of Supabase signups.