The PostgreSQL 9.6 Release
It feels like only just a few months ago that we were celebrating the release of PostgreSQL 9.5.0, but already we’re very close to the 9.6.0 release! For me personally, I’m very excited about this particular release of PostgreSQL. It was just 5 or 6 months ago that I was busy refectoring my Parallel Aggregate patch after Tom Lane made some major changes to the output of the sub-query planner.
I was really excited when my work was finally accepted as having the ability for aggregate functions to be calculated in multiple processes really help to make the whole parallel query infrastructure shine. If you missed all that, then please see my blog post about it.
Aside from a few bug fixes I submitted, all of the work I contributed related to improving performance of some workload, and for me this made working on the 9.6 release lot of fun, as I can’t even walk around my local supermarket without thinking of efficiency and performance as I try to plan out in my head what the shortest path is to get to the checkout (via all the shelves that I need to visit first).
There are lots of things in this release that are very exciting. I already mentioned Parallel Query, and also Tom Lane’s changes to the output of the final state of the sub-query planner to allow it to generate multiple different Paths rather than a final plan. For me the most exciting part about this is that it paves the way for lots of future optimisations that were previously just too hard, or just too disruptive to the code base to be worthwhile. Optimizing UNION to make use of a MergeAppend of presorted results rather than having to Sort the Appended results, and Uniquify them is now a fairly trivial change, where before such a change was rejected.
The infrastructure I worked on to allow Parallel Aggregate is also quite exciting as in the future it could also be used to calculate aggregate results over multiple PostgreSQL instances, rather than just across multiple processes in the same instance. That could allow aggregation of 100’s of terabyte to petabytes of data.
I was also pleased to have various performance improvements accepted which assisted a TPC-H style workload. One which made the query planner a bit smarter about performing GROUP BY on redundant columns, when other columns present would already guarantee uniqueness. Another makes the aggregation code a bit smart about sharing intermediate aggregate states when two aggregate functions share a common transition function, which is surprisingly common in the standard set of aggregate functions which come with PostgreSQL.
Aside from things that I was involved in, the 9.6 release looks to be very exciting. Patch submission keeps growing each year. If you’d like to read about some of the other great features that are coming soon in 9.6, please have a look at the release notes.