Be more consistent about masking xl_info with ~XLR_INFO_MASK.
authorTom Lane <[email protected]>
Fri, 4 Nov 2016 17:26:49 +0000 (13:26 -0400)
committerTom Lane <[email protected]>
Fri, 4 Nov 2016 17:26:49 +0000 (13:26 -0400)
commitd5f6f13f8e7eb1c28395807922246294da4f57bb
treeaf236a6ff61cef87298fed3a9681ae000069d6c4
parent367b99bbb13a14bd96bba6f73c231b2056ba9592
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
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogreader.c