Re: pg_stat_wal: tracking the compression effect

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: katouknl(at)oss(dot)nttdata(dot)com, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_stat_wal: tracking the compression effect
Date: 2022-08-27 07:48:21
Message-ID: CALj2ACVpRu1Ld1dejCUJVX4z6RieKn-Sj8AtzgT40GDPOYPrGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-08-27 08:36:32 Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work
Previous Message John Naylor 2022-08-27 07:36:09 Re: windows cfbot failing: my_perl