Re: [BUGS] BUG #14687: pg_xlogdump does only count "main data" forrecord length and leading to incorrect statistics - Mailing list pgsql-bugs

From Andres Freund
Subject Re: [BUGS] BUG #14687: pg_xlogdump does only count "main data" forrecord length and leading to incorrect statistics
Date
Msg-id 20170605022511.imow2t2ojsbauk72@alap3.anarazel.de
Whole thread Raw
In response to Re: [BUGS] BUG #14687: pg_xlogdump does only count "main data" forrecord length and leading to incorrect statistics  (Andres Freund <andres@anarazel.de>)
Responses Re: [BUGS] BUG #14687: pg_xlogdump does only count "main data" forrecord length and leading to incorrect statistics  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-bugs
Hi Heikki,

On 2017-06-04 16:10:12 -0700, Andres Freund wrote:
> On 2017-06-03 16:59:39 +0000, chjischj@163.com wrote:
> > Currently, record length in pg_xlogdump/pg_waldump's output only count
> > length of "main data",
> 
> Good catch!  Will fix.

I notice that this seems to originate in
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=ebc2b681b8ffa597137aa7a19619e6a21176e928
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=2c03216d831160bedd72d45f712601b6f7d03f1c
and that it's not just stats, but also plain xlogdump displaying wrong
data.

Do you see any better way to get at the !fpi len than to iterate over
the blocks and sum up the image length?  It's not really accurate to
display len (rec/tot) as total-fpi, total, but I don't have a better
backward-compatible idea?  Actually, I don't even have a better idea for
master, so maybe it's ok as proposed?

- Andres

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: [BUGS] Re: BUG #14680: startup process on standby encounter a deadlock ofTwoPhaseStateLock when redo 2PC xlog
Next
From: nblxa@mail.ru
Date:
Subject: [BUGS] BUG #14688: Wrong results in LIKE operation on JSON Type