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

Commit1812d3b

Browse files
author
Neil Conway
committed
Remove the last traces of Joe Hellerstein's "xfunc" optimization. Patch
from Alvaro Herrera. Also, removed lispsort.c, since it is no longerused.
1 parenta301582 commit1812d3b

File tree

8 files changed

+14
-138
lines changed

8 files changed

+14
-138
lines changed

‎src/backend/lib/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
# Makefile for lib (miscellaneous stuff)
55
#
66
# IDENTIFICATION
7-
# $PostgreSQL: pgsql/src/backend/lib/Makefile,v 1.18 2003/11/29 19:51:49 pgsql Exp $
7+
# $PostgreSQL: pgsql/src/backend/lib/Makefile,v 1.19 2004/04/25 18:23:56 neilc Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
subdir = src/backend/lib
1212
top_builddir = ../../..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
OBJS = dllist.olispsort.ostringinfo.o
15+
OBJS = dllist.o stringinfo.o
1616

1717
all: SUBSYS.o
1818

‎src/backend/lib/lispsort.c

Lines changed: 0 additions & 57 deletions
This file was deleted.

‎src/backend/optimizer/path/allpaths.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.112 2004/01/1423:01:55 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.113 2004/04/25 18:23:56 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -531,16 +531,6 @@ make_one_rel_by_joins(Query *root, int levels_needed, List *initial_rels)
531531
{
532532
rel= (RelOptInfo*)lfirst(x);
533533

534-
#ifdefNOT_USED
535-
536-
/*
537-
* * for each expensive predicate in each path in each
538-
* distinct rel, * consider doing pullup -- JMH
539-
*/
540-
if (XfuncMode!=XFUNC_NOPULL&&XfuncMode!=XFUNC_OFF)
541-
xfunc_trypullup(rel);
542-
#endif
543-
544534
/* Find and save the cheapest paths for this rel */
545535
set_cheapest(rel);
546536

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.168 2004/02/29 17:36:05 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.169 2004/04/25 18:23:56 neilc Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -167,19 +167,6 @@ create_plan(Query *root, Path *best_path)
167167
break;
168168
}
169169

170-
#ifdefNOT_USED/* fix xfunc */
171-
/* sort clauses by cost/(1-selectivity) -- JMH 2/26/92 */
172-
if (XfuncMode!=XFUNC_OFF)
173-
{
174-
set_qpqual((Plan)plan,
175-
lisp_qsort(get_qpqual((Plan)plan),
176-
xfunc_clause_compare));
177-
if (XfuncMode!=XFUNC_NOR)
178-
/* sort the disjuncts within each clause by cost -- JMH 3/4/92 */
179-
xfunc_disjunct_sort(plan->qpqual);
180-
}
181-
#endif
182-
183170
returnplan;
184171
}
185172

‎src/backend/optimizer/util/pathnode.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.103 2004/03/29 19:58:04 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.104 2004/04/25 18:23:56 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -243,9 +243,9 @@ set_cheapest(RelOptInfo *parent_rel)
243243
* A path is worthy if it has either a better sort order (better pathkeys)
244244
* or cheaper cost (on either dimension) than any of the existing old paths.
245245
*
246-
*Unless parent_rel->pruneable is false, wealso remove from the rel's
247-
*pathlist any old paths that are dominatedby new_path --- that is,
248-
*new_path is both cheaper and at least as wellordered.
246+
*Wealso remove from the rel's pathlist any old paths that are dominated
247+
* by new_path --- that is, new_path is both cheaper and at least as well
248+
* ordered.
249249
*
250250
* The pathlist is kept sorted by TOTAL_COST metric, with cheaper paths
251251
* at the front. No code depends on that for correctness; it's simply
@@ -342,10 +342,9 @@ add_path(RelOptInfo *parent_rel, Path *new_path)
342342
}
343343

344344
/*
345-
* Remove current element from pathlist if dominated by new,
346-
* unless xfunc told us not to remove any paths.
345+
* Remove current element from pathlist if dominated by new.
347346
*/
348-
if (remove_old&&parent_rel->pruneable)
347+
if (remove_old)
349348
{
350349
List*p1_next=lnext(p1);
351350

‎src/backend/optimizer/util/relnode.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/util/relnode.c,v 1.55 2004/02/17 00:52:53 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/util/relnode.c,v 1.56 2004/04/25 18:23:56 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -135,7 +135,6 @@ make_base_rel(Query *root, int relid)
135135
rel->cheapest_startup_path=NULL;
136136
rel->cheapest_total_path=NULL;
137137
rel->cheapest_unique_path=NULL;
138-
rel->pruneable= true;
139138
rel->relid=relid;
140139
rel->rtekind=rte->rtekind;
141140
/* min_attr, max_attr, attr_needed, attr_widths are set below */
@@ -291,7 +290,6 @@ build_join_rel(Query *root,
291290
joinrel->cheapest_startup_path=NULL;
292291
joinrel->cheapest_total_path=NULL;
293292
joinrel->cheapest_unique_path=NULL;
294-
joinrel->pruneable= true;
295293
joinrel->relid=0;/* indicates not a baserel */
296294
joinrel->rtekind=RTE_JOIN;
297295
joinrel->min_attr=0;

‎src/backend/tcop/postgres.c

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.400 2004/04/19 17:42:58 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.401 2004/04/25 18:23:56 neilc Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -89,11 +89,6 @@ bool Log_disconnections = false;
8989

9090
LogStmtLevellog_statement=LOGSTMT_NONE;
9191

92-
/*
93-
* Flags for expensive function optimization -- JMH 3/9/92
94-
*/
95-
intXfuncMode=0;
96-
9792
/* GUC variable for maximum stack depth (measured in kilobytes) */
9893
intmax_stack_depth=2048;
9994

@@ -2223,7 +2218,7 @@ PostgresMain(int argc, char *argv[], const char *username)
22232218
ctx=debug_context=PGC_POSTMASTER;
22242219
gucsource=PGC_S_ARGV;/* initial switches came from command line */
22252220

2226-
while ((flag=getopt(argc,argv,"A:B:c:D:d:Eef:FiNOPo:p:S:st:v:W:x:-:"))!=-1)
2221+
while ((flag=getopt(argc,argv,"A:B:c:D:d:Eef:FiNOPo:p:S:st:v:W:-:"))!=-1)
22272222
switch (flag)
22282223
{
22292224
case'A':
@@ -2459,39 +2454,6 @@ PostgresMain(int argc, char *argv[], const char *username)
24592454
pg_usleep(atoi(optarg)*1000000L);
24602455
break;
24612456

2462-
case'x':
2463-
#ifdefNOT_USED/* planner/xfunc.h */
2464-
2465-
/*
2466-
* control joey hellerstein's expensive function
2467-
* optimization
2468-
*/
2469-
if (XfuncMode!=0)
2470-
{
2471-
elog(WARNING,"only one -x flag is allowed");
2472-
errs++;
2473-
break;
2474-
}
2475-
if (strcmp(optarg,"off")==0)
2476-
XfuncMode=XFUNC_OFF;
2477-
elseif (strcmp(optarg,"nor")==0)
2478-
XfuncMode=XFUNC_NOR;
2479-
elseif (strcmp(optarg,"nopull")==0)
2480-
XfuncMode=XFUNC_NOPULL;
2481-
elseif (strcmp(optarg,"nopm")==0)
2482-
XfuncMode=XFUNC_NOPM;
2483-
elseif (strcmp(optarg,"pullall")==0)
2484-
XfuncMode=XFUNC_PULLALL;
2485-
elseif (strcmp(optarg,"wait")==0)
2486-
XfuncMode=XFUNC_WAIT;
2487-
else
2488-
{
2489-
elog(WARNING,"use -x {off,nor,nopull,nopm,pullall,wait}");
2490-
errs++;
2491-
}
2492-
#endif
2493-
break;
2494-
24952457
case'c':
24962458
case'-':
24972459
{

‎src/include/nodes/relation.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.93 2004/01/0523:39:54 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.94 2004/04/25 18:23:57 neilc Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -99,8 +99,6 @@ typedef struct QualCost
9999
* (regardless of its ordering)
100100
*cheapest_unique_path - for caching cheapest path to produce unique
101101
* (no duplicates) output from relation
102-
*pruneable - flag to let the planner know whether it can prune the
103-
*pathlist of this RelOptInfo or not.
104102
*
105103
* If the relation is a base relation it will have these fields set:
106104
*
@@ -193,7 +191,6 @@ typedef struct RelOptInfo
193191
structPath*cheapest_startup_path;
194192
structPath*cheapest_total_path;
195193
structPath*cheapest_unique_path;
196-
boolpruneable;
197194

198195
/* information about a base rel (not set for join rels!) */
199196
Indexrelid;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp