Re: BUG #14687: pg_xlogdump does only count "main data" for record length and leading to incorrect statistics
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-bugs@postgresql.org, chjischj@163.com
Date: 2017-06-05T08:43:37Z
Lists: pgsql-bugs
On 2017-06-05 11:23:43 +0300, Heikki Linnakangas wrote: > On 06/05/2017 05:25 AM, Andres Freund wrote: > > Hi Heikki, > > 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? > > Your patch seems OK to me. Defining non-FPI size as (total_len - fpi_len) > seems correct to me, I'm not sure what other definition you could have. I'm not sure, that's why I chose the above. But you could argue that the block ids etc. shouldn't be counted as part of either, or that the previous displaying of record len / total len doesn't make much sense anymore. Greetings, Andres Freund
Commits
-
Fix record length computation in pg_waldump/xlogdump.
- d3ca4b4b454f 9.6.4 landed
- c25ed20067d2 10.0 landed
- 25653c17143d 9.5.8 landed
-
Fix pg_xlogdump's calculation of full-page image data.
- ebc2b681b8ff 9.5.0 cited
-
Revamp the WAL record format.
- 2c03216d8311 9.5.0 cited