Re: Applying XLR_INFO_MASK correctly when looking at WAL record information

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Applying XLR_INFO_MASK correctly when looking at WAL record information
Date: 2016-11-04 17:29:09
Message-ID: 5571.1478280549@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> 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?

Grepping found a couple of additional places that needed the same
fix. Pushed with those additions.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-11-04 17:35:47 Re: Hash Indexes
Previous Message Kevin Grittner 2016-11-04 16:09:26 Re: delta relations in AFTER triggers