Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e0d64c

Browse files
committed
postgres_fdw: Push down partition-wise aggregation.
Since commit7012b13, postgres_fdwhas been able to push down the toplevel aggregation operation to theremote server. Commite2f1eb0 madeit possible to break down the toplevel aggregation into oneaggregate per partition. This commit lets postgres_fdw push downaggregation in that case just as it does at the top level.In order to make this work, this commit adds an additional argumentto the GetForeignUpperPaths FDW API. A matching argument is addedto the signature for create_upper_paths_hook. Third-party code usingeither of these will need to be updated.Also adjust create_foreignscan_plan() so that it picks up the correctset of relids in this case.Jeevan Chalke, reviewed by Ashutosh Bapat and by me and with someadjustments by me. The larger patch series of which this patch is apart was also reviewed and tested by Antonin Houska, RajkumarRaghuwanshi, David Rowley, Dilip Kumar, Konstantin Knizhnik, PascalLegrand, and Rafia Sabih.Discussion:http://postgr.es/m/CAM2+6=V64_xhstVHie0Rz=KPEQnLJMZt_e314P0jaT_oJ9MR8A@mail.gmail.comDiscussion:http://postgr.es/m/CAM2+6=XPWujjmj5zUaBTGDoB38CemwcPmjkRy0qOcsQj_V+2sQ@mail.gmail.com
1 parent0b11a67 commit7e0d64c

File tree

9 files changed

+251
-33
lines changed

9 files changed

+251
-33
lines changed

‎contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7851,3 +7851,135 @@ SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE
78517851
(14 rows)
78527852

78537853
RESET enable_partitionwise_join;
7854+
-- ===================================================================
7855+
-- test partitionwise aggregates
7856+
-- ===================================================================
7857+
CREATE TABLE pagg_tab (a int, b int, c text) PARTITION BY RANGE(a);
7858+
CREATE TABLE pagg_tab_p1 (LIKE pagg_tab);
7859+
CREATE TABLE pagg_tab_p2 (LIKE pagg_tab);
7860+
CREATE TABLE pagg_tab_p3 (LIKE pagg_tab);
7861+
INSERT INTO pagg_tab_p1 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 10;
7862+
INSERT INTO pagg_tab_p2 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 20 and (i % 30) >= 10;
7863+
INSERT INTO pagg_tab_p3 SELECT i % 30, i % 50, to_char(i/30, 'FM0000') FROM generate_series(1, 3000) i WHERE (i % 30) < 30 and (i % 30) >= 20;
7864+
-- Create foreign partitions
7865+
CREATE FOREIGN TABLE fpagg_tab_p1 PARTITION OF pagg_tab FOR VALUES FROM (0) TO (10) SERVER loopback OPTIONS (table_name 'pagg_tab_p1');
7866+
CREATE FOREIGN TABLE fpagg_tab_p2 PARTITION OF pagg_tab FOR VALUES FROM (10) TO (20) SERVER loopback OPTIONS (table_name 'pagg_tab_p2');;
7867+
CREATE FOREIGN TABLE fpagg_tab_p3 PARTITION OF pagg_tab FOR VALUES FROM (20) TO (30) SERVER loopback OPTIONS (table_name 'pagg_tab_p3');;
7868+
ANALYZE pagg_tab;
7869+
ANALYZE fpagg_tab_p1;
7870+
ANALYZE fpagg_tab_p2;
7871+
ANALYZE fpagg_tab_p3;
7872+
-- When GROUP BY clause matches with PARTITION KEY.
7873+
-- Plan with partitionwise aggregates is disabled
7874+
SET enable_partitionwise_aggregate TO false;
7875+
EXPLAIN (COSTS OFF)
7876+
SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1;
7877+
QUERY PLAN
7878+
-------------------------------------------------------
7879+
Sort
7880+
Sort Key: fpagg_tab_p1.a
7881+
-> HashAggregate
7882+
Group Key: fpagg_tab_p1.a
7883+
Filter: (avg(fpagg_tab_p1.b) < '22'::numeric)
7884+
-> Append
7885+
-> Foreign Scan on fpagg_tab_p1
7886+
-> Foreign Scan on fpagg_tab_p2
7887+
-> Foreign Scan on fpagg_tab_p3
7888+
(9 rows)
7889+
7890+
-- Plan with partitionwise aggregates is enabled
7891+
SET enable_partitionwise_aggregate TO true;
7892+
EXPLAIN (COSTS OFF)
7893+
SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1;
7894+
QUERY PLAN
7895+
----------------------------------------------------------------------
7896+
Sort
7897+
Sort Key: fpagg_tab_p1.a
7898+
-> Append
7899+
-> Foreign Scan
7900+
Relations: Aggregate on (public.fpagg_tab_p1 pagg_tab)
7901+
-> Foreign Scan
7902+
Relations: Aggregate on (public.fpagg_tab_p2 pagg_tab)
7903+
-> Foreign Scan
7904+
Relations: Aggregate on (public.fpagg_tab_p3 pagg_tab)
7905+
(9 rows)
7906+
7907+
SELECT a, sum(b), min(b), count(*) FROM pagg_tab GROUP BY a HAVING avg(b) < 22 ORDER BY 1;
7908+
a | sum | min | count
7909+
----+------+-----+-------
7910+
0 | 2000 | 0 | 100
7911+
1 | 2100 | 1 | 100
7912+
10 | 2000 | 0 | 100
7913+
11 | 2100 | 1 | 100
7914+
20 | 2000 | 0 | 100
7915+
21 | 2100 | 1 | 100
7916+
(6 rows)
7917+
7918+
-- Check with whole-row reference
7919+
-- Should have all the columns in the target list for the given relation
7920+
EXPLAIN (VERBOSE, COSTS OFF)
7921+
SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1;
7922+
QUERY PLAN
7923+
------------------------------------------------------------------------
7924+
Sort
7925+
Output: t1.a, (count(((t1.*)::pagg_tab)))
7926+
Sort Key: t1.a
7927+
-> Append
7928+
-> HashAggregate
7929+
Output: t1.a, count(((t1.*)::pagg_tab))
7930+
Group Key: t1.a
7931+
Filter: (avg(t1.b) < '22'::numeric)
7932+
-> Foreign Scan on public.fpagg_tab_p1 t1
7933+
Output: t1.a, t1.*, t1.b
7934+
Remote SQL: SELECT a, b, c FROM public.pagg_tab_p1
7935+
-> HashAggregate
7936+
Output: t1_1.a, count(((t1_1.*)::pagg_tab))
7937+
Group Key: t1_1.a
7938+
Filter: (avg(t1_1.b) < '22'::numeric)
7939+
-> Foreign Scan on public.fpagg_tab_p2 t1_1
7940+
Output: t1_1.a, t1_1.*, t1_1.b
7941+
Remote SQL: SELECT a, b, c FROM public.pagg_tab_p2
7942+
-> HashAggregate
7943+
Output: t1_2.a, count(((t1_2.*)::pagg_tab))
7944+
Group Key: t1_2.a
7945+
Filter: (avg(t1_2.b) < '22'::numeric)
7946+
-> Foreign Scan on public.fpagg_tab_p3 t1_2
7947+
Output: t1_2.a, t1_2.*, t1_2.b
7948+
Remote SQL: SELECT a, b, c FROM public.pagg_tab_p3
7949+
(25 rows)
7950+
7951+
SELECT a, count(t1) FROM pagg_tab t1 GROUP BY a HAVING avg(b) < 22 ORDER BY 1;
7952+
a | count
7953+
----+-------
7954+
0 | 100
7955+
1 | 100
7956+
10 | 100
7957+
11 | 100
7958+
20 | 100
7959+
21 | 100
7960+
(6 rows)
7961+
7962+
-- When GROUP BY clause does not match with PARTITION KEY.
7963+
EXPLAIN (COSTS OFF)
7964+
SELECT b, avg(a), max(a), count(*) FROM pagg_tab GROUP BY b HAVING sum(a) < 700 ORDER BY 1;
7965+
QUERY PLAN
7966+
------------------------------------------------------
7967+
Sort
7968+
Sort Key: fpagg_tab_p1.b
7969+
-> Finalize HashAggregate
7970+
Group Key: fpagg_tab_p1.b
7971+
Filter: (sum(fpagg_tab_p1.a) < 700)
7972+
-> Append
7973+
-> Partial HashAggregate
7974+
Group Key: fpagg_tab_p1.b
7975+
-> Foreign Scan on fpagg_tab_p1
7976+
-> Partial HashAggregate
7977+
Group Key: fpagg_tab_p2.b
7978+
-> Foreign Scan on fpagg_tab_p2
7979+
-> Partial HashAggregate
7980+
Group Key: fpagg_tab_p3.b
7981+
-> Foreign Scan on fpagg_tab_p3
7982+
(15 rows)
7983+
7984+
-- Clean-up
7985+
RESET enable_partitionwise_aggregate;

‎contrib/postgres_fdw/postgres_fdw.c

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ static bool postgresRecheckForeignScan(ForeignScanState *node,
352352
staticvoidpostgresGetForeignUpperPaths(PlannerInfo*root,
353353
UpperRelationKindstage,
354354
RelOptInfo*input_rel,
355-
RelOptInfo*output_rel);
355+
RelOptInfo*output_rel,
356+
void*extra);
356357

357358
/*
358359
* Helper functions
@@ -419,15 +420,17 @@ static void conversion_error_callback(void *arg);
419420
staticboolforeign_join_ok(PlannerInfo*root,RelOptInfo*joinrel,
420421
JoinTypejointype,RelOptInfo*outerrel,RelOptInfo*innerrel,
421422
JoinPathExtraData*extra);
422-
staticboolforeign_grouping_ok(PlannerInfo*root,RelOptInfo*grouped_rel);
423+
staticboolforeign_grouping_ok(PlannerInfo*root,RelOptInfo*grouped_rel,
424+
Node*havingQual);
423425
staticList*get_useful_pathkeys_for_relation(PlannerInfo*root,
424426
RelOptInfo*rel);
425427
staticList*get_useful_ecs_for_relation(PlannerInfo*root,RelOptInfo*rel);
426428
staticvoidadd_paths_with_pathkeys_for_rel(PlannerInfo*root,RelOptInfo*rel,
427429
Path*epq_path);
428430
staticvoidadd_foreign_grouping_paths(PlannerInfo*root,
429431
RelOptInfo*input_rel,
430-
RelOptInfo*grouped_rel);
432+
RelOptInfo*grouped_rel,
433+
GroupPathExtraData*extra);
431434
staticvoidapply_server_options(PgFdwRelationInfo*fpinfo);
432435
staticvoidapply_table_options(PgFdwRelationInfo*fpinfo);
433436
staticvoidmerge_fdw_options(PgFdwRelationInfo*fpinfo,
@@ -2775,12 +2778,15 @@ estimate_path_cost_size(PlannerInfo *root,
27752778
elseif (IS_UPPER_REL(foreignrel))
27762779
{
27772780
PgFdwRelationInfo*ofpinfo;
2778-
PathTarget*ptarget=root->upper_targets[UPPERREL_GROUP_AGG];
2781+
PathTarget*ptarget=foreignrel->reltarget;
27792782
AggClauseCostsaggcosts;
27802783
doubleinput_rows;
27812784
intnumGroupCols;
27822785
doublenumGroups=1;
27832786

2787+
/* Make sure the core code set the pathtarget. */
2788+
Assert(ptarget!=NULL);
2789+
27842790
/*
27852791
* This cost model is mixture of costing done for sorted and
27862792
* hashed aggregates in cost_agg(). We are not sure which
@@ -2805,6 +2811,12 @@ estimate_path_cost_size(PlannerInfo *root,
28052811
{
28062812
get_agg_clause_costs(root, (Node*)fpinfo->grouped_tlist,
28072813
AGGSPLIT_SIMPLE,&aggcosts);
2814+
2815+
/*
2816+
* The cost of aggregates in the HAVING qual will be the same
2817+
* for each child as it is for the parent, so there's no need
2818+
* to use a translated version of havingQual.
2819+
*/
28082820
get_agg_clause_costs(root, (Node*)root->parse->havingQual,
28092821
AGGSPLIT_SIMPLE,&aggcosts);
28102822
}
@@ -5017,11 +5029,12 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
50175029
* this function to PgFdwRelationInfo of the input relation.
50185030
*/
50195031
staticbool
5020-
foreign_grouping_ok(PlannerInfo*root,RelOptInfo*grouped_rel)
5032+
foreign_grouping_ok(PlannerInfo*root,RelOptInfo*grouped_rel,
5033+
Node*havingQual)
50215034
{
50225035
Query*query=root->parse;
5023-
PathTarget*grouping_target=root->upper_targets[UPPERREL_GROUP_AGG];
50245036
PgFdwRelationInfo*fpinfo= (PgFdwRelationInfo*)grouped_rel->fdw_private;
5037+
PathTarget*grouping_target=grouped_rel->reltarget;
50255038
PgFdwRelationInfo*ofpinfo;
50265039
List*aggvars;
50275040
ListCell*lc;
@@ -5131,11 +5144,11 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel)
51315144
* Classify the pushable and non-pushable HAVING clauses and save them in
51325145
* remote_conds and local_conds of the grouped rel's fpinfo.
51335146
*/
5134-
if (root->hasHavingQual&&query->havingQual)
5147+
if (havingQual)
51355148
{
51365149
ListCell*lc;
51375150

5138-
foreach(lc, (List*)query->havingQual)
5151+
foreach(lc, (List*)havingQual)
51395152
{
51405153
Expr*expr= (Expr*)lfirst(lc);
51415154
RestrictInfo*rinfo;
@@ -5232,7 +5245,8 @@ foreign_grouping_ok(PlannerInfo *root, RelOptInfo *grouped_rel)
52325245
*/
52335246
staticvoid
52345247
postgresGetForeignUpperPaths(PlannerInfo*root,UpperRelationKindstage,
5235-
RelOptInfo*input_rel,RelOptInfo*output_rel)
5248+
RelOptInfo*input_rel,RelOptInfo*output_rel,
5249+
void*extra)
52365250
{
52375251
PgFdwRelationInfo*fpinfo;
52385252

@@ -5252,7 +5266,8 @@ postgresGetForeignUpperPaths(PlannerInfo *root, UpperRelationKind stage,
52525266
fpinfo->pushdown_safe= false;
52535267
output_rel->fdw_private=fpinfo;
52545268

5255-
add_foreign_grouping_paths(root,input_rel,output_rel);
5269+
add_foreign_grouping_paths(root,input_rel,output_rel,
5270+
(GroupPathExtraData*)extra);
52565271
}
52575272

52585273
/*
@@ -5264,13 +5279,13 @@ postgresGetForeignUpperPaths(PlannerInfo *root, UpperRelationKind stage,
52645279
*/
52655280
staticvoid
52665281
add_foreign_grouping_paths(PlannerInfo*root,RelOptInfo*input_rel,
5267-
RelOptInfo*grouped_rel)
5282+
RelOptInfo*grouped_rel,
5283+
GroupPathExtraData*extra)
52685284
{
52695285
Query*parse=root->parse;
52705286
PgFdwRelationInfo*ifpinfo=input_rel->fdw_private;
52715287
PgFdwRelationInfo*fpinfo=grouped_rel->fdw_private;
52725288
ForeignPath*grouppath;
5273-
PathTarget*grouping_target;
52745289
doublerows;
52755290
intwidth;
52765291
Coststartup_cost;
@@ -5281,7 +5296,8 @@ add_foreign_grouping_paths(PlannerInfo *root, RelOptInfo *input_rel,
52815296
!root->hasHavingQual)
52825297
return;
52835298

5284-
grouping_target=root->upper_targets[UPPERREL_GROUP_AGG];
5299+
Assert(extra->patype==PARTITIONWISE_AGGREGATE_NONE||
5300+
extra->patype==PARTITIONWISE_AGGREGATE_FULL);
52855301

52865302
/* save the input_rel as outerrel in fpinfo */
52875303
fpinfo->outerrel=input_rel;
@@ -5295,8 +5311,13 @@ add_foreign_grouping_paths(PlannerInfo *root, RelOptInfo *input_rel,
52955311
fpinfo->user=ifpinfo->user;
52965312
merge_fdw_options(fpinfo,ifpinfo,NULL);
52975313

5298-
/* Assess if it is safe to push down aggregation and grouping. */
5299-
if (!foreign_grouping_ok(root,grouped_rel))
5314+
/*
5315+
* Assess if it is safe to push down aggregation and grouping.
5316+
*
5317+
* Use HAVING qual from extra. In case of child partition, it will have
5318+
* translated Vars.
5319+
*/
5320+
if (!foreign_grouping_ok(root,grouped_rel,extra->havingQual))
53005321
return;
53015322

53025323
/* Estimate the cost of push down */
@@ -5312,7 +5333,7 @@ add_foreign_grouping_paths(PlannerInfo *root, RelOptInfo *input_rel,
53125333
/* Create and add foreign path to the grouping relation. */
53135334
grouppath=create_foreignscan_path(root,
53145335
grouped_rel,
5315-
grouping_target,
5336+
grouped_rel->reltarget,
53165337
rows,
53175338
startup_cost,
53185339
total_cost,

‎contrib/postgres_fdw/sql/postgres_fdw.sql

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,3 +1932,54 @@ SELECT t1.a, t1.phv, t2.b, t2.phv FROM (SELECT 't1_phv' phv, * FROM fprt1 WHERE
19321932
SELECTt1.a,t1.phv,t2.b,t2.phvFROM (SELECT't1_phv' phv,*FROM fprt1WHERE a %25=0) t1 FULLJOIN (SELECT't2_phv' phv,*FROM fprt2WHERE b %25=0) t2ON (t1.a=t2.b)ORDER BYt1.a,t2.b;
19331933

19341934
RESET enable_partitionwise_join;
1935+
1936+
1937+
-- ===================================================================
1938+
-- test partitionwise aggregates
1939+
-- ===================================================================
1940+
1941+
CREATETABLEpagg_tab (aint, bint, ctext) PARTITION BY RANGE(a);
1942+
1943+
CREATETABLEpagg_tab_p1 (LIKE pagg_tab);
1944+
CREATETABLEpagg_tab_p2 (LIKE pagg_tab);
1945+
CREATETABLEpagg_tab_p3 (LIKE pagg_tab);
1946+
1947+
INSERT INTO pagg_tab_p1SELECT i %30, i %50, to_char(i/30,'FM0000')FROM generate_series(1,3000) iWHERE (i %30)<10;
1948+
INSERT INTO pagg_tab_p2SELECT i %30, i %50, to_char(i/30,'FM0000')FROM generate_series(1,3000) iWHERE (i %30)<20and (i %30)>=10;
1949+
INSERT INTO pagg_tab_p3SELECT i %30, i %50, to_char(i/30,'FM0000')FROM generate_series(1,3000) iWHERE (i %30)<30and (i %30)>=20;
1950+
1951+
-- Create foreign partitions
1952+
CREATE FOREIGN TABLE fpagg_tab_p1 PARTITION OF pagg_tab FORVALUESFROM (0) TO (10) SERVER loopback OPTIONS (table_name'pagg_tab_p1');
1953+
CREATE FOREIGN TABLE fpagg_tab_p2 PARTITION OF pagg_tab FORVALUESFROM (10) TO (20) SERVER loopback OPTIONS (table_name'pagg_tab_p2');;
1954+
CREATE FOREIGN TABLE fpagg_tab_p3 PARTITION OF pagg_tab FORVALUESFROM (20) TO (30) SERVER loopback OPTIONS (table_name'pagg_tab_p3');;
1955+
1956+
ANALYZE pagg_tab;
1957+
ANALYZE fpagg_tab_p1;
1958+
ANALYZE fpagg_tab_p2;
1959+
ANALYZE fpagg_tab_p3;
1960+
1961+
-- When GROUP BY clause matches with PARTITION KEY.
1962+
-- Plan with partitionwise aggregates is disabled
1963+
SET enable_partitionwise_aggregate TO false;
1964+
EXPLAIN (COSTS OFF)
1965+
SELECT a,sum(b),min(b),count(*)FROM pagg_tabGROUP BY aHAVINGavg(b)<22ORDER BY1;
1966+
1967+
-- Plan with partitionwise aggregates is enabled
1968+
SET enable_partitionwise_aggregate TO true;
1969+
EXPLAIN (COSTS OFF)
1970+
SELECT a,sum(b),min(b),count(*)FROM pagg_tabGROUP BY aHAVINGavg(b)<22ORDER BY1;
1971+
SELECT a,sum(b),min(b),count(*)FROM pagg_tabGROUP BY aHAVINGavg(b)<22ORDER BY1;
1972+
1973+
-- Check with whole-row reference
1974+
-- Should have all the columns in the target list for the given relation
1975+
EXPLAIN (VERBOSE, COSTS OFF)
1976+
SELECT a,count(t1)FROM pagg_tab t1GROUP BY aHAVINGavg(b)<22ORDER BY1;
1977+
SELECT a,count(t1)FROM pagg_tab t1GROUP BY aHAVINGavg(b)<22ORDER BY1;
1978+
1979+
-- When GROUP BY clause does not match with PARTITION KEY.
1980+
EXPLAIN (COSTS OFF)
1981+
SELECT b,avg(a),max(a),count(*)FROM pagg_tabGROUP BY bHAVINGsum(a)<700ORDER BY1;
1982+
1983+
1984+
-- Clean-up
1985+
RESET enable_partitionwise_aggregate;

‎doc/src/sgml/fdwhandler.sgml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ void
359359
GetForeignUpperPaths(PlannerInfo *root,
360360
UpperRelationKind stage,
361361
RelOptInfo *input_rel,
362-
RelOptInfo *output_rel);
362+
RelOptInfo *output_rel,
363+
void *extra);
363364
</programlisting>
364365
Create possible access paths for <firstterm>upper relation</firstterm> processing,
365366
which is the planner's term for all post-scan/join query processing, such
@@ -379,7 +380,11 @@ GetForeignUpperPaths(PlannerInfo *root,
379380
currently being considered. <literal>output_rel</literal> is the upper relation
380381
that should receive paths representing computation of this step,
381382
and <literal>input_rel</literal> is the relation representing the input to this
382-
step. (Note that <structname>ForeignPath</structname> paths added
383+
step. The <literal>extra</literal> parameter provides additional details,
384+
currently, it is set only for <literal>UPPERREL_PARTIAL_GROUP_AGG</>
385+
or <literal>UPPERREL_GROUP_AGG</literal>, in which case it points to a
386+
<literal>GroupPathExtraData</> structure.
387+
(Note that <structname>ForeignPath</structname> paths added
383388
to <literal>output_rel</literal> would typically not have any direct dependency
384389
on paths of the <literal>input_rel</literal>, since their processing is expected
385390
to be done externally. However, examining paths previously generated for

‎src/backend/optimizer/plan/createplan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3572,7 +3572,7 @@ create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path,
35723572
* upper rel doesn't have relids set, but it covers all the base relations
35733573
* participating in the underlying scan, so use root's all_baserels.
35743574
*/
3575-
if (IS_UPPER_REL(rel))
3575+
if (rel->reloptkind==RELOPT_UPPER_REL)
35763576
scan_plan->fs_relids=root->all_baserels;
35773577
else
35783578
scan_plan->fs_relids=best_path->path.parent->relids;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp