pgsql: Redesign pageinspect function printing infomask bits

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Redesign pageinspect function printing infomask bits
Date: 2019-09-19 02:03:17
Message-ID: E1iAlmv-0007rX-J1@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2019-09-19 04:10:18 pgsql: Doc: document autovacuum interruption.
Previous Message Alvaro Herrera 2019-09-18 19:55:04 pgsql: Fix example program in docs too (??)