Re: [REVIEW] Re: Compression of full-page-writes - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [REVIEW] Re: Compression of full-page-writes
Date
Msg-id CAB7nPqS1C5qBTditYPuOQsG29VB49GkDi1eeTEv+hp7Uq1AF+Q@mail.gmail.com
Whole thread Raw
In response to Re: [REVIEW] Re: Compression of full-page-writes  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [REVIEW] Re: Compression of full-page-writes  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers


On Sat, Dec 6, 2014 at 12:06 AM, Michael Paquier <michael.paquier@gmail.com> wrote:



On Fri, Dec 5, 2014 at 11:10 PM, Rahila Syed <rahilasyed.90@gmail.com> wrote:
I attempted quick review and could not come up with much except this

+   /*
+    * Calculate the amount of FPI data in the record. Each backup block
+    * takes up BLCKSZ bytes, minus the "hole" length.
+    *
+    * XXX: We peek into xlogreader's private decoded backup blocks for the
+    * hole_length. It doesn't seem worth it to add an accessor macro for
+    * this.
+    */
+   fpi_len = 0;
+   for (block_id = 0; block_id <= record->max_block_id; block_id++)
+   {
+       if (XLogRecHasCompressedBlockImage(record, block_id))
+           fpi_len += BLCKSZ - record->blocks[block_id].compress_len;


IIUC, fpi_len in case of compressed block image should be

fpi_len = record->blocks[block_id].compress_len;
Yep, true. Patches need a rebase btw as Heikki fixed a commit related to the stats of pg_xlogdump.

In any case, any opinions to switch this patch as "Ready for committer"?
--
Michael

pgsql-hackers by date:

Previous
From: José Luis Tallón
Date:
Subject: Re: Parallel Seq Scan
Next
From: Stephen Frost
Date:
Subject: Re: Parallel Seq Scan