Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions .github/workflows/build-gpdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ jobs:
"pg_settings":{"optimizer":"on"},
"extension":"pgaudit"
},
{"test":"gpcontrib-yagp-hooks-collector",
"make_configs":["gpcontrib/yagp_hooks_collector:installcheck"],
"extension":"yagp_hooks_collector"
},
{"test":"ic-expandshrink",
"make_configs":["src/test/isolation2:installcheck-expandshrink"]
},
Expand Down Expand Up @@ -153,19 +149,7 @@ jobs:
"contrib/xml2:installcheck"]
},
{"test":"ic-gpcontrib",
"make_configs":["gpcontrib/gp_array_agg:installcheck",
"gpcontrib/gp_debug_numsegments:installcheck",
"gpcontrib/gp_distribution_policy:installcheck",
"gpcontrib/gp_error_handling:installcheck",
"gpcontrib/gp_inject_fault:installcheck",
"gpcontrib/gp_internal_tools:installcheck",
"gpcontrib/gp_legacy_string_agg:installcheck",
"gpcontrib/gp_percentile_agg:installcheck",
"gpcontrib/gp_sparse_vector:installcheck",
"gpcontrib/gp_subtransaction_overflow:installcheck",
"gpcontrib/gpmapreduce:installcheck",
"gpcontrib/orafce:installcheck",
"gpcontrib/pgaudit:installcheck"]
"make_configs":["gpcontrib:installcheck"]
},
{"test":"ic-parallel-retrieve-cursor",
"make_configs":["src/test/isolation2:installcheck-parallel-retrieve-cursor"]
Expand Down Expand Up @@ -1033,7 +1017,7 @@ jobs:
# set env for debian build
export BUILD_DESTINATION=/opt/greenplum-db-6

if ! su - gpadmin -c "cd ${SRC_DIR} && ./configure --with-perl --with-python --with-libxml --enable-mapreduce --with-gssapi --prefix=${BUILD_DESTINATION} --with-ldap --enable-gpperfmon --with-pam --with-openssl --disable-pxf --enable-ic-proxy --enable-orafce --without-mdblocales --with-zstd --enable-tap-tests --with-yagp-hooks-collector"; then
if ! su - gpadmin -c "cd ${SRC_DIR} && ./configure --with-perl --with-python --with-libxml --enable-mapreduce --with-gssapi --prefix=${BUILD_DESTINATION} --with-ldap --enable-gpperfmon --with-pam --with-openssl --disable-pxf --enable-ic-proxy --enable-orafce --without-mdblocales --with-zstd --enable-tap-tests --with-yagp-hooks-collector --enable_debug_extensions"; then
echo "::error::Configure script failed"
exit 1
fi
Expand Down
192 changes: 67 additions & 125 deletions gpcontrib/Makefile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do not refactor this, there is no value in making this unalike to
https://github.com/apache/cloudberry/blob/main/gpcontrib/Makefile

Original file line number Diff line number Diff line change
@@ -1,146 +1,88 @@
# protect the default target for this file from the targets in Makefile.global
default: all
# gpcontrib/Makefile

subdir = gpcontrib
top_builddir = ..
include $(top_builddir)/src/Makefile.global

.PHONY: all install clean distclean gpcloud mapreduce pgaudit sr_plan

#
# targets built via top_builddir/GNUmakefile
#
recurse_targets = ""

ifeq "$(enable_debug_extensions)" "yes"
recurse_targets = gp_sparse_vector \
gp_distribution_policy \
gp_parallel_retrieve_cursor \
gp_internal_tools \
gp_pitr \
gp_debug_numsegments \
gp_inject_fault \
gp_replica_check \
gp_legacy_string_agg \
gp_array_agg \
gp_percentile_agg \
gp_error_handling \
gp_subtransaction_overflow \
gp_check_functions \
gp_aux_catalog \
gp_interconnect_stats \
temp_tables_stat
SUBDIRS = \
gp_array_agg \
gp_aux_catalog \
gp_check_functions \
gp_distribution_policy \
gp_error_handling \
gp_interconnect_stats \
gp_internal_tools \
gp_legacy_string_agg \
gp_parallel_retrieve_cursor \
gp_parser \
gp_percentile_agg \
gp_pitr \
gp_sparse_vector \
gp_subtransaction_overflow \
jsonlog-gpdb \
temp_tables_stat

ifeq ($(enable_debug_extensions),yes)
SUBDIRS += gp_debug_numsegments gp_inject_fault gp_replica_check
else
recurse_targets = gp_sparse_vector \
gp_distribution_policy \
gp_parallel_retrieve_cursor \
gp_internal_tools \
gp_pitr \
gp_parser \
jsonlog-gpdb \
gp_legacy_string_agg \
gp_array_agg \
gp_percentile_agg \
gp_error_handling \
gp_subtransaction_overflow \
gp_check_functions \
gp_aux_catalog \
gp_interconnect_stats \
temp_tables_stat
ALWAYS_SUBDIRS += gp_debug_numsegments gp_inject_fault gp_replica_check
endif

ifeq "$(with_yagp_hooks_collector)" "yes"
recurse_targets += yagp_hooks_collector
SUBDIRS += yagp_hooks_collector
else
ALWAYS_SUBDIRS += yagp_hooks_collector
endif

ifeq "$(with_zstd)" "yes"
recurse_targets += zstd
SUBDIRS += zstd
else
ALWAYS_SUBDIRS += zstd
endif

ifeq "$(with_quicklz)" "yes"
recurse_targets += quicklz
SUBDIRS += quicklz
else
ALWAYS_SUBDIRS += quicklz
endif
$(call recurse,all install clean distclean, $(recurse_targets))

all: gpcloud mapreduce orafce yezzey sr_plan pgaudit

yezzey:
@if [ "$(enable_yezzey)" = "yes" ]; then \
$(MAKE) -C yezzey
fi

gpcloud:
@if [ "$(enable_gpcloud)" = "yes" ]; then \
$(MAKE) -C gpcloud && \
$(MAKE) -C gpcloud/bin/gpcheckcloud; \
fi

mapreduce:
@if [ "$(enable_mapreduce)" = "yes" ]; then \
$(MAKE) -C gpmapreduce; \
fi

orafce:
@if [ "$(enable_orafce)" = "yes" ]; then \
$(MAKE) -C orafce NO_PGXS=true; \
fi

sr_plan:
@if [ "$(enable_sr_plan)" = "yes" ]; then \
$(MAKE) -C sr_plan NO_PGXS=true; \
fi
ifeq "$(enable_yezzey)" "yes"
SUBDIRS += yezzey
else
ALWAYS_SUBDIRS += yezzey
endif

pgaudit:
@if [ "$(enable_pgaudit)" = "yes" ]; then \
$(MAKE) -C pgaudit NO_PGXS=true; \
fi
ifeq "$(enable_mapreduce)" "yes"
SUBDIRS += gpmapreduce
else
ALWAYS_SUBDIRS += gpmapreduce
endif

ifeq "$(enable_orafce)" "yes"
SUBDIRS += orafce
else
ALWAYS_SUBDIRS += orafce
endif

install:
@if [ "$(enable_gpcloud)" = "yes" ]; then \
$(MAKE) -C gpcloud install && \
$(MAKE) -C gpcloud/bin/gpcheckcloud install; \
fi
@if [ "$(enable_yezzey)" = "yes" ]; then \
$(MAKE) -C yezzey install; \
fi
@if [ "$(enable_mapreduce)" = "yes" ]; then \
$(MAKE) -C gpmapreduce install; \
fi
@if [ "$(enable_orafce)" = "yes" ]; then \
$(MAKE) -C orafce NO_PGXS=true install; \
fi
@if [ "$(enable_pgaudit)" = "yes" ]; then \
$(MAKE) -C pgaudit NO_PGXS=true install; \
fi
@if [ "$(enable_sr_plan)" = "yes" ]; then \
$(MAKE) -C sr_plan NO_PGXS=true install; \
fi
ifeq "$(enable_sr_plan)" "yes"
SUBDIRS += sr_plan
else
ALWAYS_SUBDIRS += sr_plan
endif

clean:
if [ "$(enable_mapreduce)" = "yes" ]; then $(MAKE) -C gpmapreduce clean; fi
if [ "$(enable_gpcloud)" = "yes" ]; then $(MAKE) -C gpcloud cleanall; fi
if [ "$(enable_yezzey)" = "yes" ]; then $(MAKE) -C yezzey cleanall; fi
if [ "${enable_orafce}" = "yes" ]; then $(MAKE) -C orafce NO_PGXS=true clean; fi
if [ "${enable_sr_plan}" = "yes" ]; then $(MAKE) -C sr_plan clean; fi
if [ "${enable_pgaudit}" = "yes" ]; then $(MAKE) -C pgaudit clean; fi
ifeq "$(enable_pgaudit)" "yes"
SUBDIRS += pgaudit
else
ALWAYS_SUBDIRS += pgaudit
endif

ifeq "$(enable_gpcloud)" "yes"
SUBDIRS += gpcloud gpcloud/bin/gpcheckcloud
else
ALWAYS_SUBDIRS += gpcloud gpcloud/bin/gpcheckcloud
endif

distclean:
if [ "$(enable_mapreduce)" = "yes" ]; then $(MAKE) -C gpmapreduce distclean; fi
if [ "$(enable_gpcloud)" = "yes" ]; then $(MAKE) -C gpcloud distclean; fi
if [ "$(enable_yezzey)" = "yes" ]; then $(MAKE) -C yezzey distclean; fi
if [ "${enable_orafce}" = "yes" ]; then $(MAKE) -C orafce NO_PGXS=true distclean; fi

installcheck:
$(MAKE) -C gp_internal_tools installcheck
$(MAKE) -C gp_array_agg installcheck
$(MAKE) -C gp_aux_catalog installcheck
if [ "$(enable_mapreduce)" = "yes" ]; then \
$(MAKE) -C gpmapreduce installcheck; \
fi
if [ "$(enable_orafce)" = "yes" ]; then $(MAKE) -C orafce installcheck; fi
if [ "$(with_zstd)" = "yes" ]; then $(MAKE) -C zstd installcheck; fi
if [ "$(with_quicklz)" = "yes" ]; then $(MAKE) -C quicklz installcheck; fi
$(MAKE) -C gp_sparse_vector installcheck
$(MAKE) -C gp_percentile_agg installcheck
$(MAKE) -C gp_subtransaction_overflow installcheck
$(MAKE) -C gp_check_functions installcheck
if [ "${enable_pgaudit}" = "yes" ]; then $(MAKE) -C pgaudit installcheck; fi
$(call recurse,all install clean distclean)
$(call recurse,installcheck,$(filter-out yezzey, $(SUBDIRS)))
$(recurse_always)
10 changes: 5 additions & 5 deletions gpcontrib/orafce/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ EXTRA_CLEAN = sqlparse.c sqlparse.h sqlscan.c y.tab.c y.tab.h

#override CFLAGS += -pedantic

ifdef NO_PGXS
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/$(MODULE_big)
top_builddir = ../../
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
else
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
endif

# Disable -Wimplicit-fallthrough for this module, since it is hard to change some
Expand Down
9 changes: 9 additions & 0 deletions gpcontrib/yagp_hooks_collector/sql/yagp_cursors.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- start_ignore
\! gpconfig -c shared_preload_libraries -v 'yagp_hooks_collector'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alter system

\! gpstop -raiq
\c
-- end_ignore
CREATE EXTENSION yagp_hooks_collector;

CREATE FUNCTION yagp_status_order(status text)
Expand Down Expand Up @@ -83,3 +88,7 @@ RESET yagpcc.enable;
RESET yagpcc.report_nested_queries;
RESET yagpcc.enable_utility;
RESET yagpcc.ignored_users_list;
-- start_ignore
\! gpconfig -r shared_preload_libraries
\! gpstop -raiq
-- end_ignore
9 changes: 9 additions & 0 deletions gpcontrib/yagp_hooks_collector/sql/yagp_dist.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- start_ignore
\! gpconfig -c shared_preload_libraries -v 'yagp_hooks_collector'
\! gpstop -raiq
\c
-- end_ignore
CREATE EXTENSION yagp_hooks_collector;

CREATE OR REPLACE FUNCTION yagp_status_order(status text)
Expand Down Expand Up @@ -86,3 +91,7 @@ RESET yagpcc.enable;
RESET yagpcc.report_nested_queries;
RESET yagpcc.enable_utility;
RESET yagpcc.ignored_users_list;
-- start_ignore
\! gpconfig -r shared_preload_libraries
\! gpstop -raiq
-- end_ignore
9 changes: 9 additions & 0 deletions gpcontrib/yagp_hooks_collector/sql/yagp_select.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- start_ignore
\! gpconfig -c shared_preload_libraries -v 'yagp_hooks_collector'
\! gpstop -raiq
\c
-- end_ignore
CREATE EXTENSION yagp_hooks_collector;

CREATE OR REPLACE FUNCTION yagp_status_order(status text)
Expand Down Expand Up @@ -67,3 +72,7 @@ RESET yagpcc.enable;
RESET yagpcc.report_nested_queries;
RESET yagpcc.enable_utility;
RESET yagpcc.ignored_users_list;
-- start_ignore
\! gpconfig -r shared_preload_libraries
\! gpstop -raiq
-- end_ignore
9 changes: 9 additions & 0 deletions gpcontrib/yagp_hooks_collector/sql/yagp_utf8_trim.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- start_ignore
\! gpconfig -c shared_preload_libraries -v 'yagp_hooks_collector'
\! gpstop -raiq
\c
-- end_ignore
CREATE EXTENSION IF NOT EXISTS yagp_hooks_collector;

CREATE OR REPLACE FUNCTION get_marked_query(marker TEXT)
Expand Down Expand Up @@ -43,3 +48,7 @@ RESET yagpcc.enable;
RESET yagpcc.ignored_users_list;

DROP EXTENSION yagp_hooks_collector;
-- start_ignore
\! gpconfig -r shared_preload_libraries
\! gpstop -raiq
-- end_ignore
9 changes: 9 additions & 0 deletions gpcontrib/yagp_hooks_collector/sql/yagp_utility.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- start_ignore
\! gpconfig -c shared_preload_libraries -v 'yagp_hooks_collector'
\! gpstop -raiq
\c
-- end_ignore
CREATE EXTENSION yagp_hooks_collector;

CREATE OR REPLACE FUNCTION yagp_status_order(status text)
Expand Down Expand Up @@ -133,3 +138,7 @@ RESET yagpcc.enable;
RESET yagpcc.report_nested_queries;
RESET yagpcc.enable_utility;
RESET yagpcc.ignored_users_list;
-- start_ignore
\! gpconfig -r shared_preload_libraries
\! gpstop -raiq
-- end_ignore
Loading