PostgreSQL

PostgreSQL: Security Gets Smarter with SNI Support

Today's PostgreSQL brought us some exciting security enhancements, led by Daniel Gustafsson's major serverside SNI support implementation that enables hostname-specific SSL certificates. We also saw Michael Paquier add comprehensive SASLprep testing, Peter Eisentraut improve code quality with stricter compiler warnings, and several performance optimizations including smarter query planning for NOT IN operations.

Duration: PT4M8S

https://podlog.io/listen/postgresql-9847372b/episode/postgresql-security-gets-smarter-with-sni-support-3332909d

Transcript

Hey there, fellow code explorers! Welcome back to another episode of the PostgreSQL podcast. I'm your host, and wow, do we have some fantastic developments to dive into today from March 19th, 2026.

You know that feeling when you're working on something complex and suddenly all the pieces start clicking into place? That's exactly what's happening in the PostgreSQL world right now, and today's changes are absolutely buzzing with that energy.

Let me start with the star of the show - Daniel Gustafsson just landed some seriously impressive work on serverside SNI support for libpq. Now, if you're thinking "SNI what now?" - don't worry, I've got you covered. SNI stands for Server Name Indication, and this is a game-changer for how PostgreSQL handles SSL certificates.

Picture this: you've got one PostgreSQL server that needs to serve multiple hostnames, and each hostname needs its own SSL certificate. Before today, that was... well, let's just say it was complicated. Daniel's implementation introduces a new config file called pg_hosts.conf that lets you specify which certificate and key should be used for which hostname. It's like having a smart doorman who knows exactly which key to use for each visitor. The best part? It's backward compatible, so if you don't need SNI, everything works exactly like it did before.

This wasn't a solo effort either - Jacob Champion co-authored this work, and they had fantastic reviews from Zsolt Parragi, Chao Li, and several others. It's beautiful to see the community rallying around security improvements like this.

Speaking of security, Michael Paquier added some really thorough testing for SASLprep functionality. Now, SASLprep might sound technical, but it's actually doing something super important - it's making sure that password handling in SCRAM authentication is rock solid. Michael created a whole test module that can check every valid UTF-8 codepoint to make sure our implementation handles them correctly. It's like having a security guard that checks every single person coming through the door, but in a good way.

Peter Eisentraut has been on a code quality mission, and I'm absolutely here for it. He landed two commits that are going to make everyone's life easier. First, he cleaned up some const qualifiers - think of it as making promises in your code that you actually keep. When a function says "I won't modify this data," now the type system can actually enforce that promise. Second, he enabled stricter compiler warnings by default. I know, I know, more warnings sounds scary, but trust me on this - these warnings catch bugs before they become problems.

We also got a nice performance boost from David Rowley and Ilia Evdokimov. They optimized how PostgreSQL estimates rows for NOT IN queries when there are NULL values involved. It's one of those changes where the database just gets a little bit smarter about recognizing when it doesn't need to do extra work.

And here's something I love - Peter also made sure the meson build system can properly update Unicode data for the unaccent module. It might seem small, but keeping up with Unicode standards is crucial for international applications.

Today's focus? If you're working with SSL/TLS in PostgreSQL, definitely check out the new SNI support documentation. Even if you don't need it right now, understanding how hostname-specific certificates work could save you hours down the road. And if you're a testing enthusiast, take a look at Michael's SASLprep test module - it's a masterclass in comprehensive test coverage.

The energy in today's commits is incredible. We're seeing security improvements, performance optimizations, code quality enhancements, and better tooling all in one day. This is exactly the kind of steady, thoughtful progress that makes PostgreSQL such a joy to work with.

Keep coding, keep learning, and I'll catch you tomorrow with more PostgreSQL goodness. Until then, happy developing!