Re: Printing bitmap objects in the debugger - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Printing bitmap objects in the debugger
Date
Msg-id CAFjFpReanvz+Mb7Ky-z+E+dj_TyyJyTnGu-9bGoeCuEcJ9DHGg@mail.gmail.com
Whole thread Raw
In response to Re: Printing bitmap objects in the debugger  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Printing bitmap objects in the debugger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>
> I'd suggest that this is parallel to nodeToString() and therefore
> (a) should be placed beside it,

Done. Added it after nodeToString().

> (b) should be named like it,
> bmsToString() perhaps,

bmsToString() is fine. Used that name.

> and (c) should look more like it internally.
>

Done.

I have also added a declaration for this function in nodes.h after
definition of struct Bitmapset. WIthout this declaration compiler
gives warning "no previous declaration" of this function.

Tested it under the debugger

Breakpoint 1, make_join_rel (root=0x20cafb0, rel1=0x20e2998,
rel2=0x20dd2c0) at joinrels.c:664
(gdb) p bmsToString(rel1->relids)
$1 = 0x2102fd0 "(b 1 3)"
(gdb) p bmsToString(rel2->relids)
$2 = 0x2104bc0 "(b 4)"
(gdb) p bmsToString(joinrelids)
$3 = 0x2104fd8 "(b 1 3 4)"
(gdb) p bmsToString(joinrel->relids)
$4 = 0x2105998 "(b 1 3 4)"
(gdb) p bmsToString(joinrel->lateral_relids)
$5 = 0x2105db0 "(b)"
(gdb) p joinrel->lateral_relids
$6 = (Relids) 0x0

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Attachment

pgsql-hackers by date:

Previous
From: Bernd Helmle
Date:
Subject: Re: standalone backend PANICs during recovery
Next
From: Masahiko Sawada
Date:
Subject: Re: Block level parallel vacuum WIP