Re: pg_stat_wal: tracking the compression effect

From: Ken Kato <katouknl(at)oss(dot)nttdata(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_stat_wal: tracking the compression effect
Date: 2022-08-30 01:19:28
Message-ID: 81721c330f7e526b52060a5379b499f0@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-08-27 16:48, Bharath Rupireddy wrote:
> On Fri, Aug 26, 2022 at 8:39 AM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
>>
>> At Fri, 26 Aug 2022 11:55:27 +0900 (JST), Kyotaro Horiguchi
>> <horikyota(dot)ntt(at)gmail(dot)com> wrote in
>> > At Thu, 25 Aug 2022 16:04:50 +0900, Ken Kato <katouknl(at)oss(dot)nttdata(dot)com> wrote in
>> > > 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.
>> >
>> > Honestly, I don't think its useful much.
>> > How about adding them to pg_waldump and pg_walinspect instead?
>> >
>> > # It further widens the output of pg_waldump, though..
>>
>> Sorry, that was apparently too short.
>>
>> I know you already see that in per-record output of pg_waldump, but
>> maybe we need the summary of saved bytes in "pg_waldump -b -z" output
>> and the corresponding output of pg_walinspect.
>
> +1 for adding compression stats such as type and saved bytes to
> pg_waldump and pg_walinspect given that the WAL records already have
> the saved bytes info. Collecting them in the server via pg_stat_wal
> will require some extra effort, for instance, every WAL record insert
> requires that code to be executed. When users want to analyze the
> compression efforts they can either use pg_walinspect or pg_waldump
> and change the compression type if required.

Thank you for all the comments!

I will go with adding the compression stats in pg_waldump and
pg_walinspect.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-08-30 01:21:37 Re: effective_multixact_freeze_max_age issue
Previous Message David Rowley 2022-08-30 01:16:00 Re: Reducing the chunk header sizes on all memory context types