On 2019/05/16 11:52, David Rowley wrote:
> I don't really see where this duplicate call is. The patch calls
> op_volatile() at the very most just once per pruning step.
Ah, there's no op_volatile() on the matched clause's operator in
match_clause_to_partition_key() when it's called during a forplanner=false
run. So, while there is a duplication of efforts because
match_clause_to_partition_key() runs twice for any given clause which is
due to original design design, there is no duplication of efforts between
match_clause_to_partition_key() and analyze_partkey_exprs().
Thanks,
Amit