Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4df6332
Add gp_orca extension skeleton (#1105)
whitehawk Nov 7, 2024
dbcf6dd
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Nov 11, 2024
44115c4
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Nov 12, 2024
b1cffb6
Decouple Orca from the GPMemoryProtect_TrackStartupMemory() (#1108)
whitehawk Nov 12, 2024
acbd08a
Connect Orca via a planner hook (#1112)
whitehawk Nov 15, 2024
bf2cc5a
Decouple Orca from Explain component (#1124)
whitehawk Nov 21, 2024
927afa0
Rework gp_optimizer_functions.c to use runtime check of Orca's presen…
whitehawk Nov 25, 2024
5fada0a
Move setting of 'optimizer' GUC to the extension (#1128)
whitehawk Nov 25, 2024
1761f83
ADBDEV-6625 Decouple ORCA from the pg_hint_plan extension (#1127)
dkovalev1 Nov 26, 2024
e8158ef
Fix EnableXform() & DisableXform() functions when optimizer is off (#…
whitehawk Nov 29, 2024
b05718f
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Dec 6, 2024
5ff3de4
Rename shared lib gp_orca into orca (#1137)
whitehawk Dec 8, 2024
ffd38cd
Fix explain_format and auto_explain tests (#1136)
whitehawk Dec 9, 2024
a2a95d6
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Dec 10, 2024
7444a17
Fix error "External planner is not registered" (#1154)
whitehawk Dec 12, 2024
b4da41e
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Dec 12, 2024
1dcc5b9
Move Orca src files into the extension (#1151)
whitehawk Dec 13, 2024
5c94ce7
Fix 'gpconfig' behave test (#1158)
whitehawk Dec 17, 2024
8dd7901
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Dec 18, 2024
d7c3cea
Remove generation of USE_ORCA define (#1169)
whitehawk Dec 24, 2024
8cc3aff
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Dec 25, 2024
341d342
Move Orca's GUCs into the extension (#1167)
whitehawk Dec 25, 2024
4bf67e3
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Jan 15, 2025
f8e7224
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Jan 22, 2025
d990bd2
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Jan 26, 2025
9d659e4
Partially revert "Move Orca's GUCs into the extension (#1167)" (#1191)
whitehawk Jan 27, 2025
6056cd9
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Feb 5, 2025
3c46659
Partial revert "Decouple Orca from Explain component" (#1208)
whitehawk Feb 5, 2025
39e775e
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Feb 12, 2025
1533132
Merge branch 'adb-7.2.0' into feature/ADBDEV-6552
whitehawk Feb 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 7 additions & 0 deletions .abi-check/7.2.0_arenadata7/postgres.symbols.ignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
OptimizerMemoryContext
optimize_query
transformGroupedWindows
optopt@@GLIBC_2.2.5
optopt
optimizer_partition_selection_log
ConfigureNamesBool_gp
ConfigureNamesInt_gp
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ matrix:
--enable-orca \
--without-zstd --disable-gpfdist \
CC="ccache clang-11" CXX="ccache clang++-11" CFLAGS=-O0 CXXFLAGS=-O0
bear --append make -s -C src/backend/gpopt
bear --append -- make -s -C gpcontrib/orca
)
CLANG_TIDY=clang-tidy-11 src/tools/tidy chk-gpopt ../vpath.debug
CLANG_TIDY=clang-tidy-11 gpcontrib/orca/tools/tidy chk-gpopt ../vpath.debug
- |
(
set -e
Expand All @@ -135,13 +135,13 @@ matrix:
--enable-orca \
--without-zstd --disable-gpfdist \
CC="ccache clang-11" CXX="ccache clang++-11" CFLAGS=-O0 CXXFLAGS=-O0
bear --append make -s -C src/backend/gpopt
bear --append -- make -s -C gpcontrib/orca
)
CLANG_TIDY=clang-tidy-11 src/tools/tidy chk-gpopt ../vpath.release
- CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=Debug -Hsrc/backend/gporca -Bbuild.debug
- CLANG_TIDY=clang-tidy-11 src/tools/tidy chk-orca build.debug
- CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -Hsrc/backend/gporca -Bbuild.relwithdebinfo
- CLANG_TIDY=clang-tidy-11 src/tools/tidy chk-orca build.relwithdebinfo
CLANG_TIDY=clang-tidy-11 gpcontrib/orca/tools/tidy chk-gpopt ../vpath.release
- CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=Debug -Hgpcontrib/orca/gporca -Bbuild.debug
- CLANG_TIDY=clang-tidy-11 gpcontrib/orca/tools/tidy chk-orca build.debug
- CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -Hgpcontrib/orca/gporca -Bbuild.relwithdebinfo
- CLANG_TIDY=clang-tidy-11 gpcontrib/orca/tools/tidy chk-orca build.relwithdebinfo

- name: check-format
stage: lint
Expand All @@ -157,9 +157,9 @@ matrix:
before_script: ~
after_script: ~
script:
- env CLANG_FORMAT=clang-format-11 src/tools/fmt gen
- env CLANG_FORMAT=clang-format-11 gpcontrib/orca/tools/fmt gen
- git diff --exit-code
- env CLANG_FORMAT=clang-format-11 src/tools/fmt chk
- env CLANG_FORMAT=clang-format-11 gpcontrib/orca/tools/fmt chk

stages:
- lint
Expand Down
2 changes: 1 addition & 1 deletion arenadata/Dockerfile.linter
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ COPY . /opt/gpdb_src

ENV CLANG_FORMAT=clang-format-11

ENTRYPOINT src/tools/fmt gen && git diff --exit-code && src/tools/fmt chk
ENTRYPOINT gpcontrib/orca/tools/fmt gen && git diff --exit-code && gpcontrib/orca/tools/fmt chk
2 changes: 1 addition & 1 deletion concourse/scripts/unit_tests_gporca.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function test_orca
return
fi
OUTPUT_DIR="../../../../gpAux/ext/${BLD_ARCH}"
pushd ${GPDB_SRC_PATH}/src/backend/gporca
pushd ${GPDB_SRC_PATH}/gpcontrib/orca/gporca
concourse/build_and_test.py --build_type=RelWithDebInfo --output_dir=${OUTPUT_DIR}
concourse/build_and_test.py --build_type=Debug --output_dir=${OUTPUT_DIR}
popd
Expand Down
2 changes: 1 addition & 1 deletion concourse/tasks/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
- name: gpdb_src
path: .
run:
path: src/tools/fmt
path: gpcontrib/orca/tools/fmt
args: [ chk ]
params:
CLANG_FORMAT: clang-format-11
16 changes: 8 additions & 8 deletions concourse/tasks/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ run:
--enable-orca \
--without-python --without-readline --without-zlib --without-zstd --without-libbz2 --disable-gpfdist --disable-gpcloud --without-libcurl \
CC="ccache clang-11" CXX="ccache clang++-11" CFLAGS=-O0 CXXFLAGS=-O0
bear --append make -s -C src/backend/gpopt
bear --append -- make -s -C gpcontrib/orca
)
(
mkdir vpath.release
Expand All @@ -31,17 +31,17 @@ run:
--enable-orca \
--without-python --without-readline --without-zlib --without-zstd --without-libbz2 --disable-gpfdist --disable-gpcloud --without-libcurl \
CC="ccache clang-11" CXX="ccache clang++-11" CFLAGS=-O0 CXXFLAGS=-O0
bear --append make -s -C src/backend/gpopt
bear --append -- make -s -C gpcontrib/orca
)
(
cd gpdb_src
src/tools/tidy chk-gpopt ../vpath.debug
src/tools/tidy chk-gpopt ../vpath.release
gpcontrib/orca/tools/tidy chk-gpopt ../vpath.debug
gpcontrib/orca/tools/tidy chk-gpopt ../vpath.release

CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=Debug -Hsrc/backend/gporca -Bbuild.debug
src/tools/tidy chk-orca build.debug
CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -Hsrc/backend/gporca -Bbuild.relwithdebinfo
src/tools/tidy chk-orca build.relwithdebinfo
CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=Debug -Hgpcontrib/orca/gporca -Bbuild.debug
gpcontrib/orca/tools/tidy chk-orca build.debug
CXX=clang++-11 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -Hgpcontrib/orca/gporca -Bbuild.relwithdebinfo
gpcontrib/orca/tools/tidy chk-orca build.relwithdebinfo
)

params:
Expand Down
6 changes: 1 addition & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -7905,9 +7905,7 @@ if test "${enable_orca+set}" = set; then :
enableval=$enable_orca;
case $enableval in
yes)

$as_echo "#define USE_ORCA 1" >>confdefs.h

:
;;
no)
:
Expand All @@ -7920,8 +7918,6 @@ $as_echo "#define USE_ORCA 1" >>confdefs.h
else
enable_orca=yes

$as_echo "#define USE_ORCA 1" >>confdefs.h

fi


Expand Down
4 changes: 1 addition & 3 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,7 @@ PGAC_ARG_BOOL(enable, cassert, no, [enable assertion checks (for debugging)],
#
# Enable GPORCA optimizer
#
PGAC_ARG_BOOL(enable, orca, yes, [disable ORCA optimizer],
[AC_DEFINE([USE_ORCA], 1,
[Define to 1 to build with Greenplum ORCA optimizer. (--enable-orca)])])
PGAC_ARG_BOOL(enable, orca, yes, [disable ORCA optimizer])
AC_MSG_RESULT([checking whether to build with ORCA... $enable_orca])
AC_SUBST(enable_orca)

Expand Down
2 changes: 1 addition & 1 deletion contrib/auto_explain/expected/auto_explain.out
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Finalize Aggregate (cost=35148.64..35148.65 rows=1 width=8) (actual rows=1 loop
-> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..53.05 rows=1001 width=0) (actual rows=1001 loops=1)
-> Seq Scan on auto_explain_test.t2 (cost=0.00..13.01 rows=334 width=0) (actual rows=340 loops=1)
Optimizer: Postgres-based planner
Settings: enable_nestloop = 'on', optimizer = 'off'
Settings: enable_nestloop = 'on'
(slice0) Executor memory: 131K bytes.
(slice1) Executor memory: 152K bytes avg x 3 workers, 152K bytes max (seg0).
(slice2) Executor memory: 42K bytes avg x 3 workers, 42K bytes max (seg0).
Expand Down
2 changes: 1 addition & 1 deletion contrib/auto_explain/expected/auto_explain_optimizer.out
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Finalize Aggregate (cost=0.00..1326086.34 rows=1 width=8) (actual rows=1 loops=
-> Seq Scan on auto_explain_test.t1 (cost=0.00..431.01 rows=334 width=1) (actual rows=340 loops=1)
-> Seq Scan on auto_explain_test.t2 (cost=0.00..431.01 rows=334 width=1) (actual rows=340 loops=1002)
Optimizer: GPORCA
Settings: enable_nestloop = 'on'
Settings: enable_nestloop = 'on', optimizer = 'on'
(slice0) Executor memory: 67K bytes.
(slice1) Executor memory: 119K bytes avg x 3 workers, 119K bytes max (seg0).
(slice2) Executor memory: 42K bytes avg x 3 workers, 42K bytes max (seg0).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- start_ignore
\! gpconfig -r shared_preload_libraries;
\! gpconfig -c shared_preload_libraries -v "$(psql -At -c "SELECT array_to_string(array_remove(string_to_array(current_setting('shared_preload_libraries'), ','), 'pg_stat_statements'), ',')" postgres)"
\! gpstop -raq -M fast;
-- end_ignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- start_ignore
\! gpconfig -c shared_preload_libraries -v 'pg_stat_statements';
\! gpconfig -c shared_preload_libraries -v "$(psql -At -c "SELECT array_to_string(array_append(string_to_array(current_setting('shared_preload_libraries'), ','), 'pg_stat_statements'), ',')" postgres)"
\! gpstop -raq -M fast;
-- end_ignore
2 changes: 1 addition & 1 deletion gpMgmt/bin/minirepro
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def dump_extstats(cur, oid_str, f_out):

def get_non_default_optimization_gucs(cursor):
# Ignore 'optimizer' guc as it is turned off by minirepro while creating connection object
query = "select name, setting from pg_settings where category like 'Query Tuning%' and setting!=boot_val and name!='optimizer';"
query = "select name, setting from pg_settings where (category like 'Query Tuning%' or category='Customized Options') and setting!=boot_val and name!='optimizer';"
try:
cursor.execute(query)
except psycopg2.DatabaseError as e:
Expand Down
3 changes: 3 additions & 0 deletions gpcontrib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ endif
ifeq "$(with_zstd)" "yes"
recurse_targets += zstd
endif
ifeq "$(enable_orca)" "yes"
recurse_targets += orca
endif
$(call recurse,all install clean distclean, $(recurse_targets))

all: gpcloud orafce
Expand Down
File renamed without changes.
Loading