Applying XLR_INFO_MASK correctly when looking at WAL record information

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Applying XLR_INFO_MASK correctly when looking at WAL record information
Date: 2016-10-28 04:55:15
Message-ID: CAB7nPqSWVyaZJg7_amRKVqRpEP=_=54e+762+2PF9u3Q3+Z0Nw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I have just been trapped by the fact that in some code paths we look
at the RMGR information of a WAL record (record->xl_info) but the
filter dedicated to it, ~XLR_INFO_MASK, is not applied. This is
harmful now, but this could lead to problems if in the future new
record-level flags, similar to XLR_SPECIAL_REL_UPDATE, are added.
Disclaimer: I am looking at a patch where a record-level flag makes
sense, still this looks like a separate problem.

What about the patch attached to make things more consistent?
Thanks,
--
Michael

Attachment Content-Type Size
wal-xlinfo.patch text/x-diff 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-10-28 05:10:56 Re: Unicode mapping scripts cleanup
Previous Message Amit Kapila 2016-10-28 04:33:16 Re: Hash Indexes