New wal format distorts pg_xlogdump --stats - Mailing list pgsql-hackers

From Andres Freund
Subject New wal format distorts pg_xlogdump --stats
Date
Msg-id 20141125033651.GH31915@alap3.anarazel.de
Whole thread Raw
Responses Re: New wal format distorts pg_xlogdump --stats  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
Hi,

The new WAL format calculates FPI vs plain record data like:rec_len = XLogRecGetDataLen(record) +
SizeOfXLogRecord;fpi_len= record->decoded_record->xl_tot_len - rec_len;
 

Due to the amount of data now handled outside the main data portion ,
that doesn't seem correct to me. As an example, a couple thousand
inserts with full_page_writes=off now yields:

Type                                           N      (%)          Record size      (%)             FPI size      (%)
    Combined size      (%)
 
----                                           -      ---          -----------      ---             --------      ---
    -------------      ---
 
Heap/INSERT                                30167 ( 99.53)               814509 ( 99.50)               965856 ( 99.54)
          1780365 ( 99.52)
 

I think fpi_len now needs to only count the sum of the of the actual
length of block images, and all the rest needs to be rec_len.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: postgresql.auto.conf comments
Next
From: Noah Misch
Date:
Subject: Re: The problems of PQhost()