Set of fixes for WAL consistency check facility

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, kuntalghosh(dot)2007(at)gmail(dot)com
Subject: Set of fixes for WAL consistency check facility
Date: 2017-02-14 01:00:39
Message-ID: CAB7nPqQqFiYNF5vBDVgLEk6aOvSK_8ZR1H=Vkv-hALiOz-0tYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Beginning a new thread to raise awareness... As already reported here,
I had a look at what has been committed in a507b869:
https://www.postgresql.org/message-id/CAB7nPqRzCQb=vdfHvMtP0HMLBHU6z1aGdo4GJsUP-HP8jx+Pkw@mail.gmail.com

Here are a couple of things I have noticed while looking at the code:

+ * Portions Copyright (c) 2016, PostgreSQL Global Development Group
s/2016/2017/ in bufmask.c and bufmask.h.

+ if (ItemIdIsNormal(iid))
+ {
+
+ HeapTupleHeader page_htup = (HeapTupleHeader) page_item;
Unnecessary newline here.

+ * Read the contents from the backup copy, stored in WAL record and
+ * store it in a temporary page. There is not need to allocate a new
+ * page here, a local buffer is fine to hold its contents and a mask
+ * can be directly applied on it.
s/not need/no need/.

In checkXLogConsistency(), FPWs that have the flag BKPIMAGE_APPLY set
will still be checked, resulting in a FPW being compared to itself. I
think that those had better be bypassed.

Please find attached a patch with those fixes. I am attaching as well
this patch to next CF.
Regards,
--
Michael

Attachment Content-Type Size
consistency-checks-fix.patch application/octet-stream 2.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2017-02-14 01:21:46 Re: Parallel bitmap heap scan
Previous Message Jeff Janes 2017-02-14 00:09:41 renaming pg_resetxlog to pg_resetwal has broken pg_upgrade.