PostgreSQL Moves Ahead With Employing Zstd Compression
Back in February PostgreSQL began working on Zstd compression support and now with the latest code changes of the past week, this modern compression algorithm developed at Facebook is now able to play a greater role with this leading open-source database server.
Last month PostgreSQL developers began with the infrastructure changes around handling Zstd compression as an alternative to their LZ4 compression.
The code work in recent days to land includes supporting Zstd base backup compression. Both PostgreSQL client and server-side compression now supports using Zstd.
The other big addition is this commit providing Zstd compression of full-page writes in the WAL. PostgreSQL's Write Ahead Logging now supports Zstd compression of full-page images using Zstd. Currently this is being done at the default Zstd compression level of 3.
As for the performance benefit of the Zstd'ed WAL, "zstd outclasses easily pglz, and is better than LZ4 where one wants to have more compression at the cost of extra CPU but both are good enough in their own scenarios, so the choice between one or the other of these comes to a study of the workload patterns and the schema involved, mainly."
Look for this Zstd compression work and more in the eventual PostgreSQL 15 release.
Last month PostgreSQL developers began with the infrastructure changes around handling Zstd compression as an alternative to their LZ4 compression.
The code work in recent days to land includes supporting Zstd base backup compression. Both PostgreSQL client and server-side compression now supports using Zstd.
The other big addition is this commit providing Zstd compression of full-page writes in the WAL. PostgreSQL's Write Ahead Logging now supports Zstd compression of full-page images using Zstd. Currently this is being done at the default Zstd compression level of 3.
As for the performance benefit of the Zstd'ed WAL, "zstd outclasses easily pglz, and is better than LZ4 where one wants to have more compression at the cost of extra CPU but both are good enough in their own scenarios, so the choice between one or the other of these comes to a study of the workload patterns and the schema involved, mainly."
Look for this Zstd compression work and more in the eventual PostgreSQL 15 release.
12 Comments