pgsql: Add flag values in WAL description to all heap records

Started by Michael Paquierover 7 years ago5 messageshackers
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Add flag values in WAL description to all heap records

Hexadecimal is consistently used as format to not bloat too much the
output but keep it readable. This information is useful mainly for
debugging purposes with for example pg_waldump.

Author: Michael Paquier
Reviewed-by: Nathan Bossart, Dmitry Dolgov, Andres Freund, Álvaro
Herrera
Discussion: /messages/by-id/20180413034734.GE1552@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3be97b97ed37b966173f027091f21d8a7605e2a5

Modified Files
--------------
src/backend/access/rmgrdesc/heapdesc.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Michael Paquier (#1)
Re: pgsql: Add flag values in WAL description to all heap records

On 2018-Nov-14, Michael Paquier wrote:

Add flag values in WAL description to all heap records

Hexadecimal is consistently used as format to not bloat too much the
output but keep it readable. This information is useful mainly for
debugging purposes with for example pg_waldump.

Just noticed: ISTM we should also print the infobits_set flags in
xl_heap_lock and xl_heap_lock_updated. I can add those.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#3Michael Paquier
michael@paquier.xyz
In reply to: Alvaro Herrera (#2)
Re: pgsql: Add flag values in WAL description to all heap records

On Wed, Nov 14, 2018 at 11:02:46AM -0300, Alvaro Herrera wrote:

Just noticed: ISTM we should also print the infobits_set flags in
xl_heap_lock and xl_heap_lock_updated. I can add those.

OK, feel free to do so if you have time, or I can add them myself if
you would like me to do so. Another thing I was wondering is if we
should show the information of individual tuples data for
XLOG_HEAP2_FREEZE_PAGE records (under a different option?).
--
Michael

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Michael Paquier (#3)
Re: pgsql: Add flag values in WAL description to all heap records

On 2018-Nov-15, Michael Paquier wrote:

On Wed, Nov 14, 2018 at 11:02:46AM -0300, Alvaro Herrera wrote:

Just noticed: ISTM we should also print the infobits_set flags in
xl_heap_lock and xl_heap_lock_updated. I can add those.

OK, feel free to do so if you have time, or I can add them myself if
you would like me to do so.

Now that I re-check, it's already done. Sorry for the noise.

Another thing I was wondering is if we should show the information of
individual tuples data for XLOG_HEAP2_FREEZE_PAGE records (under a
different option?).

Not sure. Won't that become too verbose? I don't remember needing that
info for debugging.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#5Michael Paquier
michael@paquier.xyz
In reply to: Alvaro Herrera (#4)
Re: pgsql: Add flag values in WAL description to all heap records

On Thu, Nov 15, 2018 at 12:33:35PM -0300, Alvaro Herrera wrote:

Not sure. Won't that become too verbose? I don't remember needing that
info for debugging.

Okay, let's drop this idea then. I haven't needed that myself until
now.
--
Michael