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

From Amit Langote
Subject Re: Record a Bitmapset of non-pruned partitions
Date
Msg-id CA+HiwqFDo3JTKfF+7uPrkrgKYz9XWn9BORaTmY0MH13Fvn7j+w@mail.gmail.com
Whole thread Raw
In response to Re: Record a Bitmapset of non-pruned partitions  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Record a Bitmapset of non-pruned partitions  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Mon, Jul 12, 2021 at 11:47 AM David Rowley <dgrowleyml@gmail.com> wrote:
> v3 patches

0001 looks mostly fine, except I thought the following could be worded
to say that the bitmap members are offsets into the part_rels array.
To avoid someone confusing them with RT indexes, for example.

+   Bitmapset  *live_parts;     /* Bitmap with members to indicate which
+                                * partitions survived partition pruning. */

On 0002:

interleaved_parts idea looks clever.  I wonder if you decided that
it's maybe not worth setting that field in the joinrel's
PartitionBoundInfos?  For example, adding the code that you added in
create_list_bounds() also in merge_list_bounds().

...  The definition of interleaved
+ * is any partition that can contain multiple different values where exists at
+ * least one other partition which could contain a value which is between the
+ * multiple possible values in the other partition.

The sentence sounds a bit off starting at "...where exists".  How about:

"A partition is considered interleaved if it contains multiple values
such that there exists at least one other partition containing a value
that lies between those values [ in terms of partitioning-defined
ordering ]."

Looks fine otherwise.


--
Amit Langote
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)
Next
From: Peter Geoghegan
Date:
Subject: Re: A qsort template