Re: Record a Bitmapset of non-pruned partitions - Mailing list pgsql-hackers

From David Rowley
Subject Re: Record a Bitmapset of non-pruned partitions
Date
Msg-id CAApHDvo7T-iDCbXbbkVSMPZ6ZK9UHtY32a-so+hVOzc1nHyu6w@mail.gmail.com
Whole thread Raw
In response to Re: Record a Bitmapset of non-pruned partitions  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: Record a Bitmapset of non-pruned partitions  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
On Thu, 30 Sept 2021 at 20:25, Amit Langote <amitlangote09@gmail.com> wrote:
> Related to the above, I noticed while looking at
> build_merged_partition_bounds() that db632fbca3 missed adding a line
> to that function to set interleaved_parts to NULL.  Because the
> PartitionBoundInfo is only palloc'd (not palloc0'd), interleaved_parts
> of a "merged" bounds struct ends up pointing to garbage, so let's fix
> that.  Attached a patch.

Thanks for the patch.

I think we also need to document that interleaved_parts is not set for
join relations, otherwise someone may in the future try to use that
field for an optimisation for join relations.  At the moment, per
generate_orderedappend_paths, we only handle IS_SIMPLE_REL type
relations.

I've attached a patch that updates the comments to mention this.

David

Attachment

pgsql-hackers by date:

Previous
From: Florin Irion
Date:
Subject: Reserve prefixes for loaded libraries proposal
Next
From: Chapman Flack
Date:
Subject: Re: Reserve prefixes for loaded libraries proposal