From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | "Syed, Rahila" <Rahila(dot)Syed(at)nttdata(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [REVIEW] Re: Compression of full-page-writes |
Date: | 2015-02-16 11:55:20 |
Message-ID: | CAB7nPqSXnQ=-h2Rr=OqFc2rhyz6W4rto3Vhk8_gCnFaMLn3Q+g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 16, 2015 at 8:30 PM, Syed, Rahila <Rahila(dot)Syed(at)nttdata(dot)com>
wrote:
>
> Regarding the sanity checks that have been added recently. I think that
> they are useful but I am suspecting as well that only a check on the record
> CRC is done because that's reliable enough and not doing those checks
> accelerates a bit replay. So I am thinking that we should simply replace
> >them by assertions.
>
> Removing the checks makes sense as CRC ensures correctness . Moreover ,as
> error message for invalid length of record is present in the code ,
> messages for invalid block length can be redundant.
>
> Checks have been replaced by assertions in the attached patch.
>
After more thinking, we may as well simply remove them, an error with CRC
having high chances to complain before reaching this point...
> Current
>
> if ((hole_length != 0) &&
>
> + (*len >= orig_len -
> SizeOfXLogRecordBlockImageCompressionInfo))
>
> + return false;
>
> +return true
>
This makes sense.
Nitpicking 1:
+ Assert(!(blk->with_hole == 1 && blk->hole_offset <= 0));
Double-space here.
Nitpicking 2:
char * page
This should be rewritten as char *page, the "*" being assigned with the
variable name.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-02-16 11:55:36 | Re: [REVIEW] Re: Compression of full-page-writes |
Previous Message | Syed, Rahila | 2015-02-16 11:30:20 | Re: [REVIEW] Re: Compression of full-page-writes |