Postgres 19 Feature Preview: What's New and Why It Matters | SQLFlash

Postgres 19 Feature Preview: What's New and Why It Matters

Rebooter.S
3 min read
Postgres 19 Feature Preview: What's New and Why It Matters

So Postgres 19 dropped. I know, I know—every time a new version comes out, everyone’s like “omg update now!” and half the time it’s just boring bug fixes. But this one? Actually worth your time.

Been running Postgres in production for going on 9 years now. Seen way too many “performance improvements” that did the opposite. But the 19 release? Pretty solid.

That Vacuum Fix You’ve Been Waiting For

Okay, vacuum is boring. I get it. But if you’re running anything bigger than a couple hundred gigs, you know the pain. Postgres 19 finally—no seriously, FINALLY—made parallel vacuum smart about indexes. Before, it just looked at table size. Now it actually factors in how big your indexes are.

My friend who’s a DBA at this fintech startup said their weekend vacuum went from 4 hours to under 2. That’s not a typo. Four hours. Under two. That’s real time back in your weekend.

Query Planner Stopped Being Dumb

You know that feeling when Postgres decides to do a sequential scan on a 50 million row table because it thought there’d be 1 row? Yeah. That’s because the planner was garbage at estimating stuff with correlated subqueries and lateral joins.

Postgres 19 fixed the stats gathering. Run EXPLAIN ANALYZE on your slow queries after upgrading. Some of them are probably gonna be way faster now. Some might be slower—check your plans.

MERGE Actually Works Now

This is huge for anyone doing ETL. Before, MERGE was kinda limited. Now you can do multiple MATCHED conditions, different NOT MATCHED targets, and use RETURNING to get back what changed.

1
2
3
4
5
6
MERGE INTO orders AS t
USING incoming AS s
ON t.id = s.id
WHEN MATCHED AND s.status = 'cancelled' THEN DELETE
WHEN NOT MATCHED THEN INSERT (id, data) VALUES (s.id, s.data)
RETURNING *;

Finally. Why did that take so long?

COPY Has Progress Now

If you’ve ever ran COPY on a huge file and just sat there wondering if it crashed or if it’s still working—you’re welcome. Progress reporting is finally here. Also error handling with LOG ERRORS. Game changer for data loading.

pg_id Is Kind of Cool

Distributed systems folks will like this. pg_id gives you snowflake-style IDs without needing an external service. Timestamp + node + sequence all in one value. No coordination needed.

1
2
SELECT pg_id.gen_random_id('order', 1);
-- gives you something like: 1.2025.1742345234.1.42

Sorts by time automatically. Pretty handy.

Other Stuff

  • JSON path now does regex
  • Memory handling for maintenance is less of a pain to tune
  • pg_stat_activity shows actual memory per query now
  • pg_basebackup can throttle bandwidth

Should You Update?

If you’re on 16 or 17, yeah. Do it. Test first though—the planner changes mean some queries might pick different plans. Check your extensions too.

If you’re on something ancient, maybe do a staged upgrade. Jump one major version at a time.

TL;DR

Postgres 19 is good. Not revolutionary, but solid. Performance stuff actually helps. Developer stuff actually works. Worth the upgrade.

Now if you’ll excuse me, I’ve got some databases to vacuum.


Got slow queries? Our PostgreSQL tuning guide has more tips →

Want more database content? [Drop your email, we’ll send stuff →]

Ready to elevate your SQL performance?

Join us and experience the power of SQLFlash today!.