Re: [PATCH] pageinspect function to decode infomasks
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-10-14T17:58:01Z
Lists: pgsql-hackers
On Fri, Oct 13, 2017 at 4:36 PM, Peter Geoghegan <pg@bowt.ie> wrote: > No, I'm arguing that they're just bits. Show the bits, rather than > interpreting what is displayed. Document that there are other logical > states that are represented as composites of contradictory/mutually > exclusive states. /me shrugs. I think it's perfectly sensible to view those 2 bits as making up a 2-bit field with 4 states rather than displaying each bit individually, but you obviously disagree. Fair enough. >> I guess it ends wherever we decide to stop. > > You can take what you're saying much further. What about > HEAP_XMAX_SHR_LOCK, and HEAP_MOVED? Code like HEAP_LOCKED_UPGRADED() > pretty strongly undermines the idea that these composite values are > abstractions. HEAP_MOVED is obviously a different kind of thing. The combination of both bits has no meaning distinct from the meaning of the individual bits; in fact, I think it's a shouldn't-happen state. Not sure about HEAP_XMAX_SHR_LOCK. > pg_filedump doesn't display HEAP_XMIN_FROZEN, either. (Nor does it > ever display any of the other composite t_infomask/t_infomask2 > values.) I can think of two possible explanations for that. Number one, the tool was written before HEAP_XMIN_FROZEN was invented and hasn't been updated for those changes. Number two, the author of the tool agrees with your position rather than mine. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Redesign pageinspect function printing infomask bits
- 58b4cb30a5bf 13.0 landed
-
Add to pageinspect function to make t_infomask/t_infomask2 human-readable
- ddbd5d873161 13.0 landed
-
Improve documentation of pageinspect
- 1fb2d78cb946 10.11 landed
- 6472d7ad5d70 11.6 landed
- 08e68825c1d6 12.0 landed
- 292ae8af79b4 13.0 landed
-
Improve pageinspect module
- d6061f83a166 9.6.0 cited