If you are doing this for logs, then [TimescaleDB compression][1] is a good option. This is because there is a strong time-based component in logs and command output and thus we consider this time-series data and can use time-based techniques to compress this data. Disclaimer: I work for Timescale and helped develop this feature. [1]: https://www.timescale.com/blog/what-is-toast-and-why-it-isnt-enough-for-data-compression-in-postgres/