I got annoyed (not for the first time) by the fact that the partitioned_rels field of AppendPath and MergeAppendPath is a list of Relids, i.e., Bitmapsets. This is problematic because a Bitmapset is not a type of Node, and thus a List of them is really an invalid data structure. The main practical consequence is that pprint() fails to print these path types accurately, which is an issue for debugging.
We've had some related problems before, so I'm wondering if it's time to bite the bullet and turn Bitmapsets into legal Nodes. We'd have to add a nodetag field to them, which is free on 64-bit machines due to alignment considerations, but would increase the size of most Bitmapsets on 32-bit machines. OTOH, I do not think we're optimizing for 32-bit machines anymore. Another issue is that the outfuncs/readfuncs print representation currently looks like "(b 1 2 ...)" which isn't a normal representation for a Node. I'd be inclined to try to preserve that representation, because I think we'd have to special-case Bitmapsets anyway given their variable number of unnamed entries. But I've not tried to actually code anything for it. Thoughts? regards, tom lane