Hi hackers,

We can specify compression method (for example, lz4, zstd), but it is hard to know the effect of compression depending on the method. There is already a way to know the compression effect using pg_waldump. However, having these statistics in the view makes it more accessible. I am proposing to add statistics, which keeps track of compression effect in pg_stat_ wal view.

The design I am thinking is below:

compression_saved | compression_times
------------------+-------------------
            38741 |                6


Accumulating the values, which indicates how much space is saved by each compression (size before compression - size after compression), and keep track of how many times compression has happened. So that one can know how much space is saved on average.

What do you think?

Regards,

--
Ken Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION


Reply via email to