Make Bitmapsets be valid Nodes.
Tom Lane <tgl@sss.pgh.pa.us>
Make Bitmapsets be valid Nodes. Add a NodeTag field to struct Bitmapset. This is free because of alignment considerations on 64-bit hardware. While it adds some space on 32-bit machines, we aren't optimizing for that case anymore. The advantage is that data structures such as Lists of Bitmapsets are now first-class objects to the Node infrastructure, and don't require special-case code to handle. This patch includes removal of one such special case, in indxpath.c: bms_equal_any() can now be replaced by list_member(). There may be more existing code that could be simplified, but I didn't look very hard. We also get to drop the read_write_ignore annotations on a couple of RelOptInfo fields. The outfuncs/readfuncs support is arranged so that nothing changes in the string representation of a Bitmapset field; therefore, this doesn't need a catversion bump. Amit Langote and Tom Lane Discussion: https://postgr.es/m/109089.1668197158@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/nodes/bitmapset.c | modified | +2 −0 |
| src/backend/nodes/copyfuncs.c | modified | +6 −0 |
| src/backend/nodes/equalfuncs.c | modified | +6 −0 |
| src/backend/nodes/gen_node_support.pl | modified | +1 −0 |
| src/backend/nodes/Makefile | modified | +1 −0 |
| src/backend/nodes/outfuncs.c | modified | +5 −0 |
| src/backend/nodes/read.c | modified | +29 −1 |
| src/backend/nodes/readfuncs.c | modified | +6 −1 |
| src/backend/optimizer/path/indxpath.c | modified | +4 −24 |
| src/include/nodes/bitmapset.h | modified | +5 −0 |
| src/include/nodes/meson.build | modified | +1 −0 |
| src/include/nodes/pathnodes.h | modified | +2 −4 |
Discussion
- Making Bitmapsets be valid Nodes 4 messages · 2022-11-11 → 2022-11-14