pgsql: Redesign pageinspect function printing infomask bits - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Redesign pageinspect function printing infomask bits
Date
Msg-id E1iAlmv-0007rX-J1@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Redesign pageinspect function printing infomask bits

After more discussion, the new function added by ddbd5d8 could have been
designed in a better way.  Based on an idea from Álvaro, instead of
returning one column which includes both the raw and combined flags, use
two columns, with one for the raw flags and one for the combined flags.

This also takes care of some issues with HEAP_LOCKED_UPGRADED and
HEAP_XMAX_IS_LOCKED_ONLY which are not really combined flags as they
depend on conditions defined by other raw bits, as mentioned by Amit.

While on it, fix an extra issue with combined flags.  A combined flag
was returned if at least one of its bits was set, but all its bits need
to be set to include it in the result.

Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Amit Kapila
Discussion: https://postgr.es/m/20190913114950.GA3824@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/58b4cb30a5bf52d71a4d0e5f9f7e1da3e64f67cc

Modified Files
--------------
contrib/pageinspect/expected/page.out         | 174 +++++++-------------------
contrib/pageinspect/heapfuncs.c               | 138 +++++++++++---------
contrib/pageinspect/pageinspect--1.7--1.8.sql |   5 +-
contrib/pageinspect/sql/page.sql              |  42 +++----
doc/src/sgml/pageinspect.sgml                 |  18 +--
5 files changed, 153 insertions(+), 224 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Fix example program in docs too (??)
Next
From: Amit Kapila
Date:
Subject: pgsql: Doc: document autovacuum interruption.