Re: Wrong statistics for size of XLOG_SWITCH during pg_waldump.

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: Shinya11(dot)Kato(at)nttdata(dot)com
Cc: movead(dot)li(at)highgo(dot)ca, pgsql-hackers(at)postgresql(dot)org, andres(at)anarazel(dot)de, michael(at)paquier(dot)xyz, ahsan(dot)hadi(at)highgo(dot)ca
Subject: Re: Wrong statistics for size of XLOG_SWITCH during pg_waldump.
Date: 2020-12-04 06:20:47
Message-ID: 20201204.152047.1606427486743708152.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for taking a look on this.

At Fri, 4 Dec 2020 04:20:47 +0000, <Shinya11(dot)Kato(at)nttdata(dot)com> wrote in
> When I execute pg_waldump, I found that XLOG/SWITCH_JUNK appears twice.
> Is this problem solved by the way of correcting the previously discussed Transaction/COMMIT?
>
> $ ../bin/pg_waldump --stats=record ../data/pg_wal/000000010000000000000001
> Type N (%) Record size (%) FPI size (%) Combined size (%)
> ---- - --- ----------- --- -------- --- ------------- ---
..
> XLOG/SWITCH_JUNK 0 ( 0.00) 0 ( 0.00) 0 ( 0.00) 0 ( 0.00)
...
> XLOG/SWITCH_JUNK 0 ( 0.00) 0 ( 0.00) 0 ( 0.00) 0 ( 0.00)

Yeah, that's because of XLogDumpDisplayStats forgets to consider ri
(rmgr id) when showing the lines. If there's a record with info = 0x04
for other resources than RM_XLOG_ID, the spurious line is shown.

The first one is for XLOG_HEAP2_VISIBLE and the latter is for
XLOG_HEAP_HOT_UPDATE, that is, both of which are not for XLOG_SWITCH..

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2020-12-04 06:29:51 Re: A new function to wait for the backend exit after termination
Previous Message Fujii Masao 2020-12-04 06:19:23 Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit