PostgreSQL: Publishing Power-Up and Performance Gains
A substantial day for PostgreSQL with major improvements to logical replication through the new EXCEPT TABLE functionality in publications, plus a significant performance boost by switching the default TOAST compression from pglz to LZ4. Additional testing improvements and code cleanups round out a productive development cycle.
Duration: PT4M6S
Transcript
Hey there, developers! Welcome back to another episode of the PostgreSQL podcast. I'm your host, and wow, do we have some exciting changes to dive into today - March 4th, 2026. Grab your coffee because we're talking about some really impactful improvements that landed in the PostgreSQL codebase.
Let's jump right into the biggest story of the day, and it's all about making logical replication more flexible and powerful. Amit Kapila merged a fantastic feature that extends CREATE PUBLICATION with EXCEPT TABLE syntax. Now, I know that might sound technical, but here's why this is actually a game-changer for anyone working with database replication.
Picture this scenario: you want to replicate almost all of your tables to a subscriber, but maybe you have some sensitive data tables or temporary tables that you absolutely don't want replicated. Before this change, you'd have to explicitly list every single table you DID want to replicate. Now? You can just say "give me everything EXCEPT these specific tables." It's like having a smart filter that says "copy everything but skip the stuff I don't need."
What's really elegant about this implementation is how they handled partitioned tables. When you exclude a root table, it automatically excludes all current AND future partitions in that tree. That's the kind of forward-thinking design that saves you from headaches down the road.
This was truly a team effort - and I love seeing this in open source. We had contributions from vignesh C and Shlok Kyal, with reviews from an incredible nine different developers. That's the PostgreSQL community at its best, folks - thorough, collaborative, and focused on getting things right.
Now, let's talk about something that's going to make your database faster without you doing anything at all. Michael Paquier made a change that switches the default TOAST compression from pglz to LZ4. For those who might be new to this, TOAST is PostgreSQL's way of handling large data values, and compression helps keep your storage efficient.
Here's the beautiful part: LZ4 is not only more space-efficient on average, but it also uses less CPU. So you're getting better compression AND better performance. It's like upgrading your car's engine and getting better gas mileage at the same time. Since LZ4 support has been stable in PostgreSQL for about five releases now, the team felt confident making this the new default.
This change follows a similar pattern to when they switched ICU to be the default for internationalization support. It shows PostgreSQL's commitment to evolving with better tools while maintaining backward compatibility.
We also saw some nice quality-of-life improvements in testing. Heikki Linnakangas cleaned up the prepared transactions test to skip gracefully when the required configuration isn't available, reducing maintenance overhead. Plus, there's a new test that helps catch some tricky edge cases with row locking and multixids in prepared transactions.
On the optimization front, Richard Guo made some smart cleanups, removing redundant restriction checks that were no longer needed thanks to improvements in constant folding. It's the kind of housekeeping that keeps the codebase lean and efficient.
Thomas Munro and the team added pause and resume functionality to read streams, which is going to be super helpful for complex access patterns. And we got some practical improvements to documentation, including better systemd configuration examples.
For today's focus, if you're working with logical replication, definitely check out the new EXCEPT TABLE functionality - it might simplify your publication setup significantly. And if you're doing any TOAST-heavy operations, keep an eye out for those performance improvements from the LZ4 switch in your next PostgreSQL upgrade.
Remember, every commit we talked about today represents someone in the community saying "I can make this better" and then actually doing the work. That's what makes PostgreSQL such an incredible project to be part of.
That's a wrap on today's episode! Keep coding, keep learning, and I'll catch you tomorrow with more PostgreSQL goodness. Until then, happy developing!