Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / test / regress / regressplans.sh
blob67b54b697d66e4e3310908ce971e3069a972c266
1 #! /bin/sh
3 # This script runs the Postgres regression tests with all useful combinations
4 # of the backend options that disable various query plan types. If the
5 # results are not all the same, it may indicate a bug in a particular
6 # plan type, or perhaps just a regression test whose results aren't fully
7 # determinate (eg, due to lack of an ORDER BY keyword).
9 # Run this in the src/test/regress directory, after doing the usual setup
10 # for a regular regression test, ie, "make clean all" (you should be ready
11 # to do "make runtest").
13 # The backend option switches that we use here are:
14 # -fs disable sequential scans
15 # -fi disable index scans
16 # -fn disable nestloop joins
17 # -fm disable merge joins
18 # -fh disable hash joins
19 # Only mergejoin and hashjoin are really guaranteed to turn off; the others
20 # just bias the optimizer's cost calculations heavily against that choice.
21 # There's no point in trying to turn off both scan types or all three join
22 # types simultaneously; ergo, we have 3*7 = 21 interesting combinations.
24 # Note that this will take *more than* 21 times longer than a regular
25 # regression test, since we are preventing the system from using the most
26 # efficient available query plans! Have patience.
29 # Select make to use --- default gmake, can be overridden by env var
30 MAKE="${MAKE:-gmake}"
32 # If PGOPTIONS is already defined, we'll add the -f switches to it.
33 PGOPTIONS="${PGOPTIONS:-}"
35 mkdir planregress
37 PGOPTIONS="$PGOPTIONS " $MAKE runtest
38 mv -f regression.out planregress/out.normal
39 mv -f regression.diffs planregress/diffs.normal
40 PGOPTIONS="$PGOPTIONS -fh" $MAKE runtest
41 mv -f regression.out planregress/out.h
42 mv -f regression.diffs planregress/diffs.h
43 PGOPTIONS="$PGOPTIONS -fm " $MAKE runtest
44 mv -f regression.out planregress/out.m
45 mv -f regression.diffs planregress/diffs.m
46 PGOPTIONS="$PGOPTIONS -fm -fh" $MAKE runtest
47 mv -f regression.out planregress/out.mh
48 mv -f regression.diffs planregress/diffs.mh
49 PGOPTIONS="$PGOPTIONS -fn " $MAKE runtest
50 mv -f regression.out planregress/out.n
51 mv -f regression.diffs planregress/diffs.n
52 PGOPTIONS="$PGOPTIONS -fn -fh" $MAKE runtest
53 mv -f regression.out planregress/out.nh
54 mv -f regression.diffs planregress/diffs.nh
55 PGOPTIONS="$PGOPTIONS -fn -fm " $MAKE runtest
56 mv -f regression.out planregress/out.nm
57 mv -f regression.diffs planregress/diffs.nm
58 PGOPTIONS="$PGOPTIONS -fi " $MAKE runtest
59 mv -f regression.out planregress/out.i
60 mv -f regression.diffs planregress/diffs.i
61 PGOPTIONS="$PGOPTIONS -fi -fh" $MAKE runtest
62 mv -f regression.out planregress/out.ih
63 mv -f regression.diffs planregress/diffs.ih
64 PGOPTIONS="$PGOPTIONS -fi -fm " $MAKE runtest
65 mv -f regression.out planregress/out.im
66 mv -f regression.diffs planregress/diffs.im
67 PGOPTIONS="$PGOPTIONS -fi -fm -fh" $MAKE runtest
68 mv -f regression.out planregress/out.imh
69 mv -f regression.diffs planregress/diffs.imh
70 PGOPTIONS="$PGOPTIONS -fi -fn " $MAKE runtest
71 mv -f regression.out planregress/out.in
72 mv -f regression.diffs planregress/diffs.in
73 PGOPTIONS="$PGOPTIONS -fi -fn -fh" $MAKE runtest
74 mv -f regression.out planregress/out.inh
75 mv -f regression.diffsregression.planregress/inh
76 PGOPTIONS="$PGOPTIONS -fi -fn -fm " $MAKE runtest
77 mv -f regression.out planregress/out.inm
78 mv -f regression.diffs planregress/diffs.inm
79 PGOPTIONS="$PGOPTIONS -fs " $MAKE runtest
80 mv -f regression.out planregress/out.s
81 mv -f regression.diffs planregress/diffs.s
82 PGOPTIONS="$PGOPTIONS -fs -fh" $MAKE runtest
83 mv -f regression.out planregress/out.sh
84 mv -f regression.diffs planregress/diffs.sh
85 PGOPTIONS="$PGOPTIONS -fs -fm " $MAKE runtest
86 mv -f regression.out planregress/out.sm
87 mv -f regression.diffs planregress/diffs.sm
88 PGOPTIONS="$PGOPTIONS -fs -fm -fh" $MAKE runtest
89 mv -f regression.out planregress/out.smh
90 mv -f regression.diffs planregress/diffs.smh
91 PGOPTIONS="$PGOPTIONS -fs -fn " $MAKE runtest
92 mv -f regression.out planregress/out.sn
93 mv -f regression.diffs planregress/diffs.sn
94 PGOPTIONS="$PGOPTIONS -fs -fn -fh" $MAKE runtest
95 mv -f regression.out planregress/out.snh
96 mv -f regression.diffs planregress/diffs.snh
97 PGOPTIONS="$PGOPTIONS -fs -fn -fm " $MAKE runtest
98 mv -f regression.out planregress/out.snm
99 mv -f regression.diffs planregress/diffs.snm
101 exit 0