pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shinya11.Kato@nttdata.com
To: movead.li@highgo.ca
Cc: pgsql-hackers@postgresql.org
Cc: andres@anarazel.de
Cc: michael@paquier.xyz
Cc: ahsan.hadi@highgo.ca
Cc: horikyota.ntt@gmail.com
Subject: RE: Wrong statistics for size of XLOG_SWITCH during pg_waldump.
Date: Thu, 10 Dec 2020 01:34:08 +0000
Message-ID: <b0a32c58414546b78b03f2c281f2f145@MP-MSGSS-MBX001.msg.nttdata.co.jp> (raw)
In-Reply-To: <20201204.152047.1606427486743708152.horikyota.ntt@gmail.com>
References: <20201016.180033.217520066292592870.horikyota.ntt@gmail.com>
	<2020101617395691465546@highgo.ca>
	<240cd11dc6664dfcbef50c2d6b16ccb2@MP-MSGSS-MBX001.msg.nttdata.co.jp>
	<20201204.152047.1606427486743708152.horikyota.ntt@gmail.com>

Thanks for the reply. > Mr.Horiguchi.

I reviewed the patch and found some problems.

>+ if(startSegNo != endSegNo)
>+ else if(record->ReadRecPtr / XLOG_BLCKSZ !=
>+ if(rmid == RM_XLOG_ID && info == XLOG_SWITCH)
>+ if(ri == RM_XLOG_ID)
>+ if(info == XLOG_SWITCH)
You need to put a space after the "if".

>@@ -24,6 +24,7 @@
>#include "common/logging.h"
>#include "getopt_long.h"
>#include "rmgrdesc.h"
>+#include "catalog/pg_control.h"
I think the include statements should be arranged in alphabetical order.

>+ info = (rj << 4) & ~XLR_INFO_MASK;
>+ if(info == XLOG_SWITCH)
>+ XLogDumpStatsRow(psprintf("XLOG/SWITCH_JUNK"),
>+ 0, total_count, stats->junk_size, total_rec_len,
>+ 0, total_fpi_len, stats->junk_size, total_len);

Can't be described in the same way as "XLogDumpStatsRow(psprintf("%s/%s", desc->rm_name, id)..."?
Only this part looks strange.

Why are the "count" and "fpi_len" fields 0?

I think you need to improve the duplicate output in column "XLOG/SWITCH_JUNK".


Regards,
Shinya Kato


view thread (28+ messages)  latest in thread

Message-ID: <b0a32c58414546b78b03f2c281f2f145@MP-MSGSS-MBX001.msg.nttdata.co.jp>
Permalink:  ../b0a32c58414546b78b03f2c281f2f145@MP-MSGSS-MBX001.msg.nttdata.co.jp/
Also on:    postgresql.org/message-id/b0a32c58414546b78b03f2c281f2f145@MP-MSGSS-MBX001.msg.nttdata.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: Shinya11.Kato@nttdata.com, movead.li@highgo.ca, andres@anarazel.de, michael@paquier.xyz, ahsan.hadi@highgo.ca, horikyota.ntt@gmail.com
  Subject: RE: Wrong statistics for size of XLOG_SWITCH during pg_waldump.
  In-Reply-To: <b0a32c58414546b78b03f2c281f2f145@MP-MSGSS-MBX001.msg.nttdata.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox