Re: Partial join - Mailing list pgsql-hackers

From Arne Roland
Subject Re: Partial join
Date
Msg-id 22c352db506e4636b397d41a5dcba7e6@index.de
Whole thread Raw
In response to Re: Partial join  (Richard Guo <riguo@pivotal.io>)
List pgsql-hackers
Richard Guo <riguo@pivotal.io> wrote:
> Please refer to the code snippet below:
>
> @@ -1164,8 +1164,8 @@ generate_join_implied_equalities(PlannerInfo *root,
>                 List       *sublist = NIL;
>
>                 /* ECs containing consts do not need any further enforcement */
>                 if (ec->ec_has_const)
>                         continue;

Sorry, I'm quite busy currently. And thanks! That was a good read.

I might be wrong, but I think have_partkey_equi_join in joinrels.c should be aware of the const case. My naive approach would be keeping pointers to the first few constant clauses, which are referencing to a yet unmatched partition key, to keep the memory footprint feasible in manner similar to pk_has_clause. The question would be what to do, if there are a lot of const expressions on the part keys. One could palloc additional memory in that case, hoping that it will be quite rare. Or is there a different, better way to go about that?
Thank you for your feedback!

Regards
Arne

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cleanup isolation specs from unused steps
Next
From: Andres Freund
Date:
Subject: Re: Duplicated LSN in ReorderBuffer