Re: Add wal_fpi_bytes_[un]compressed to pg_stat_wal

From: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add wal_fpi_bytes_[un]compressed to pg_stat_wal
Date: 2025-10-31 02:15:03
Message-ID: CAOzEurQ1LfSMk9U71tcKqo6KvGbasJGjin16=PBLP3xC8zWDSw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 30, 2025 at 3:57 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Tue, Oct 28, 2025 at 10:04:20PM +0900, Michael Paquier wrote:
> > I'll clean up that tomorrow, which can be summarized as something like
> > the attached (quick fix, need to double-check).
>
> Done this cleanup as d3111cb753e8, and tweaked a bit the second patch
> (order of the fields and docs) before applying it as 5ab0b6a24807.

Thank you for the fix and committing.

> On top of what has been already done here, should we also update the
> logs generated by do_analyze_rel() and heap_vacuum_rel()?

You're right, I missed them. I have created a patch that addresses the
above. Similar to EXPLAIN, I wanted to use 'fpi' and 'fpi bytes', but
the VACUUM/ANALYZE logs showed 'full pages images', so I used 'full
page image bytes'.

postgres=# vacuum (verbose) pg_class;
~snip~
WAL usage: 1 records, 1 full page images, 7935 bytes, 7816 full page
image bytes, 0 buffers full

postgres=# analyze (verbose) pg_class;
~snip~
WAL usage: 92 records, 6 full page images, 49416 bytes, 37488 full
page image bytes, 0 buffers full

--
Best regards,
Shinya Kato
NTT OSS Center

Attachment Content-Type Size
v4-0003-Add-wal_fpi_bytes-to-VACUUM-and-ANALYZE-logs.patch application/octet-stream 2.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-10-31 04:31:41 Re: Consistently use the XLogRecPtrIsInvalid() macro
Previous Message Peter Smith 2025-10-31 02:04:16 Re: Logical Replication of sequences