This is a new post based on my previous “Postgresql upgrade from 9.6 to 10.0“, with necessary updates and corrections. The latest Postgresql 12 (12.1) further improved performance on parallel queries, partitions, automatic (but overridable) inlining of common table expressions (CTEs) .