Thread: pgsql: Be more consistent about masking xl_info with ~XLR_INFO_MASK.

pgsql: Be more consistent about masking xl_info with ~XLR_INFO_MASK.

From
Tom Lane
Date:
Be more consistent about masking xl_info with ~XLR_INFO_MASK.

Generally, WAL resource managers are only supposed to examine the
top 4 bits of a WAL record's xl_info; the rest are reserved for
the WAL mechanism itself.  A few places were not consistent about
doing this with respect to XLOG_CHECKPOINT and XLOG_SWITCH records.
There's no bug currently, since no additional bits ever get set in
these specific record types, but that might not be true forever.
Let's follow the generic coding rule here too.

Michael Paquier

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d5f6f13f8e7eb1c28395807922246294da4f57bb

Modified Files
--------------
src/backend/access/transam/xlog.c       | 13 ++++++++-----
src/backend/access/transam/xlogreader.c |  3 ++-
2 files changed, 10 insertions(+), 6 deletions(-)