| From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> | 
|---|---|
| To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Antonin Houska <ah(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: Ordered Partitioned Table Scans | 
| Date: | 2019-03-27 06:48:33 | 
| Message-ID: | 5db99f00-8f25-d833-f2dc-da85b0b15d89@lab.ntt.co.jp | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Hi David,
Sorry if this was discussed before, but why does this patch add any new
code to partprune.c?  AFAICT, there's no functionality changes to the
pruning code.
Both
+bool
+partkey_is_bool_constant_for_query(RelOptInfo *partrel, int partkeycol)
and
+static bool
+matches_boolean_partition_clause(RestrictInfo *rinfo, int partkeycol,
+                                 RelOptInfo *partrel)
seem like their logic is specialized enough to be confined to pathkeys.c,
only because it's needed there.
Regarding
+bool
+partitions_are_ordered(PlannerInfo *root, RelOptInfo *partrel)
I think this could simply be:
bool
partitions_are_ordered(PartitionBoundInfo *boundinfo)
and be defined in partitioning/partbounds.c.  If you think any future
modifications to this will require access to the partition key info in
PartitionScheme, maybe the following is fine:
bool
partitions_are_ordered(RelOptInfo *partrel)
Thanks,
Amit
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2019-03-27 06:55:57 | txid_status() off-by-one error | 
| Previous Message | Eric Hanson | 2019-03-27 06:40:10 | SET LOCAL ROLE NO RESET -- sandbox transactions |