pgsql: Be more consistent about masking xl_info with ~XLR_INFO_MASK. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Be more consistent about masking xl_info with ~XLR_INFO_MASK.
Date
Msg-id E1c2iGX-0003du-DT@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Back-patch portability fixes for contrib/pageinspect/ginfuncs.c.
Next
From: Tom Lane
Date:
Subject: pgsql: Delete contrib/xml2's legacy implementation of xml_is_well_forme