postgresql 18 fresh out of oven

Breakthrough Speed. Major New Features.

Kyle ChungKyle Chung

Breakthrough Speed. Major New Features.

PostgreSQL 18

The wait is over. The PostgreSQL Global Development Group has officially released PostgreSQL 18, continuing its nearly decade-long tradition of delivering major updates every fall. This isn't just another incremental update; it’s a landmark release packed with 202 new features—a 25% increase over last year.

For the developers and teams relying on the world's most loved database, PostgreSQL 18 delivers on three key promises: revolutionary performance, powerful new tools that require less code, and smarter, more secure operations.

Let’s break down the features that will have the biggest impact on your applications and show you how to start using them on Zeabur today.


A Quantum Leap in Performance: Asynchronous I/O

The undisputed headliner of PostgreSQL 18 is the new asynchronous I/O (AIO) subsystem. This is a foundational upgrade designed to crush one of the biggest performance bottlenecks in any database: the time spent waiting for data to move between disk and memory.

The Old Problem: Previously, when Postgres needed data from disk, it often had to pause and wait for that operation to complete before it could do anything else. It was like making one phone call and waiting on hold, wasting valuable CPU cycles that could have been used for other work.

The AIO Solution: PostgreSQL 18 changes the game. The database can now issue multiple I/O requests concurrently and continue processing other tasks in parallel while the disk catches up. CPU resources remain free, so queries and background operations can advance simultaneously.

What This Means for You: Initial blogs and benchmarks are showing 2x to 3x performance improvements for I/O-heavy workloads like sequential scans and vacuums. For your applications, this translates to:

  • Faster Query Execution: Your app feels more responsive.
  • Better Throughput: Analytics and machine learning pipelines can process data faster.
  • Greater Hardware Efficiency: You get more performance out of your existing CPU without changing a single line of application code.

Empowering Developers: More Power, Less Code

Postgres 18 introduces several quality-of-life features that solve long-standing debates and make day-to-day development easier and more efficient.

1. Native UUIDv7 Support

The debate between using SERIAL or UUID for primary keys is almost over. PostgreSQL 18 introduces the native uuidv7() function.

  • What it is: A new standard UUID format that embeds a timestamp.
  • Why it’s better: Unlike the random UUIDv4, UUIDv7 values are naturally ordered. This dramatically improves B-tree index performance and cache efficiency, leading to faster inserts and updates without the index bloat caused by random keys.
-- Create a table using UUIDv7 as the primary key
CREATE TABLE orders (
    id UUID PRIMARY KEY DEFAULT uuidv7(),
    total DECIMAL(10,2),
    created_at TIMESTAMP DEFAULT NOW()
);

2. Virtual Generated Columns as the Default

Generated columns just got smarter. In Postgres 18, they now default to being VIRTUAL.

  • What it is: The column's value is computed on the fly when read, rather than being calculated and stored on disk when written.
  • Why it’s better: This saves significant disk space by eliminating redundant data and speeds up INSERT and UPDATE operations. It's perfect for deriving data, like calculating an annual_salary from a monthly_salary.
CREATE TABLE employees (
    salary DECIMAL(10,2),
    -- 'VIRTUAL' is now the default, so no extra keyword is needed
    annual_salary DECIMAL(12,2) GENERATED ALWAYS AS (salary * 12)
);

3. Smarter Indexing with B-tree Skip Scans

This feature removes a long-standing limitation of multi-column indexes. Previously, if you had an index on (region, category, sale_date), you could only use it efficiently if your query included the leading column, region.

  • What it is: With skip scan, Postgres can intelligently "skip" over the distinct values in the omitted prefix columns.
  • Why it’s better: Your multi-column indexes become far more flexible. You can now efficiently query by category and sale_date even if you don't filter by region, making your existing indexes more powerful for analytics and reporting.

4. access OLD and NEW Values in RETURNING

The RETURNING clause has been supercharged. You can now access both the pre-update (OLD) and post-update (NEW) values in a single statement. This is a massive win for creating audit logs or handling complex logic without needing triggers or extra queries.

-- Update price and see both the old and new values in one query
UPDATE products
SET price = price * 1.10
WHERE name = 'Widget'
RETURNING
    name,
    old.price AS old_price,
    new.price AS new_price;

Smarter & More Secure Operations

PostgreSQL 18 also includes features that reduce operational burden and help you build more robust systems.

  • Built-in OAuth 2.0 Authentication: A major win for enterprises. You can now delegate authentication to identity providers like Google, Auth0, or Okta. This centralizes credential management and allows applications to connect using access tokens rather than passwords.
  • Temporal Constraints (WITHOUT OVERLAPS): You can now enforce time-based integrity at the schema level. This ensures that time ranges in your tables do not overlap incorrectly—perfect for scheduling systems, bookings, or employee contracts. It guarantees that the "bars" on your Gantt chart never overlap when they shouldn't.
  • Improved EXPLAIN Output: Query optimization just got easier. EXPLAIN ANALYZE output now includes buffer usage information by default, helping you instantly spot I/O performance issues that were previously easy to overlook.

Deploy PostgreSQL 18 on Zeabur Today

Knowing about these features is great, but using them is even better. We're excited to announce that PostgreSQL 18 is available to deploy on Zeabur today.

You can spin up a new, fully-configured PostgreSQL 18 service in just one click, putting all this new power—from Asynchronous I/O to native UUIDv7—right at your fingertips. Experience the breakthrough speed and major new features for yourself.

Deploy PostgreSQL 18 Now