Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4be9e4a
[yagp_hooks_collector] Add extension skeleton with GRPC transport
Smyatkin-Maxim Mar 23, 2023
8f3f0c6
[yagp_hooks_collector] Fix segfault in plan text generator
Smyatkin-Maxim Mar 28, 2023
1bf1d76
[yagp_hooks_collector] Add executor instrumentation, /proc stats, and…
Smyatkin-Maxim Mar 29, 2023
7680c38
[yagp_hooks_collector] Apply llvm code style
Smyatkin-Maxim Apr 6, 2023
76cb553
[yagp_hooks_collector] Switch to query_info_collect_hook and fix stab…
Smyatkin-Maxim Apr 10, 2023
ac9a4ea
[yagp_hooks_collector] Add debian packaging and bionic GRPC compatibi…
Smyatkin-Maxim May 1, 2023
96c005b
[yagp_hooks_collector] Add CDB metrics, query nesting, and configurat…
Smyatkin-Maxim May 4, 2023
5dd24e1
[yagp_hooks_collector] Diff system stats per-query and improve error …
Smyatkin-Maxim Jun 7, 2023
244b1e3
[yagp_hooks_collector] Fix EventSender and GrpcConnector in forked pr…
Smyatkin-Maxim Jun 13, 2023
5011ddf
[yagp_hooks_collector] Fix memory leak in EXPLAIN ANALYZE code path
Smyatkin-Maxim Aug 16, 2023
f54c583
[yagp_hooks_collector] Add motion network and workfile spill stats
Smyatkin-Maxim Sep 6, 2023
2a40208
[yagp_hooks_collector] Clean up threading, signal handling, and logging
Smyatkin-Maxim Sep 6, 2023
036e15e
[yagp_hooks_collector] Add ignored_users_list GUC
Smyatkin-Maxim Sep 21, 2023
004fffd
[yagp_hooks_collector] Replace GRPC transport with protobuf-over-UDS
Smyatkin-Maxim Oct 2, 2023
7933790
[yagp_hooks_collector] Fix missing query statuses after protobuf migr…
Smyatkin-Maxim Nov 2, 2023
6f416a9
[yagp_hooks_collector] Add stat_messages() runtime statistics view
Smyatkin-Maxim Nov 13, 2023
e941608
[yagp_hooks_collector] Fix message lifecycle ordering and memory leaks
Smyatkin-Maxim Nov 15, 2023
fb41ea5
[yagp_hooks_collector] Improve query_id and resource group resolution
Smyatkin-Maxim Dec 26, 2023
14ca85b
[yagp_hooks_collector] Add nested query tracking
Smyatkin-Maxim May 17, 2024
a9048d4
[yagp_hooks_collector] Add configurable text field trimming
Smyatkin-Maxim May 28, 2024
a861071
[yagp_hooks_collector] Add error message reporting for failed queries
Smyatkin-Maxim May 28, 2024
965bb64
[yagp_hooks_collector] Change report_nested_queries to PGC_USERSET
Smyatkin-Maxim Jun 3, 2024
b61e59a
[yagp_hooks_collector] Diff per-query stats between submit and end
Smyatkin-Maxim Jun 13, 2024
e8be9c9
[yagp_hooks_collector] Fix try/catch block when calling C++ code from…
Smyatkin-Maxim Aug 7, 2024
ce906c2
[yagp_hooks_collector] Improve nested query handling and add slice info
Smyatkin-Maxim Sep 12, 2024
0d13067
[yagp_hooks_collector] Split EventSender into submodules
Smyatkin-Maxim Nov 7, 2024
9fa6ab1
[yagp_hooks_collector] Ignore EXPLAIN VERBOSE errors for unsupported …
Smyatkin-Maxim Apr 7, 2025
7c33bd1
[yagp_hooks_collector] Add per-slice interconnect statistics
Smyatkin-Maxim Apr 18, 2025
15d4d6b
[yagp_hooks_collector] Fix user filtering propagation timing
NJrslv Jun 9, 2025
8ba10d7
[yagp_hooks_collector] Miscellaneous fixes and refactoring
NJrslv Jun 16, 2025
2ffb146
[yagp_hooks_collector] Add conditional EXPLAIN ANALYZE collection
NJrslv Jun 24, 2025
87dc570
[yagp_hooks_collector] Fix memory leaks, add safe C++ wrappers, impro…
NJrslv Jun 27, 2025
972192d
[yagp_hooks_collector] Add utility statement tracking and metrics doc…
NJrslv Jul 14, 2025
ed059a2
[yagp_hooks_collector] Add regression tests, ANALYZE text output, and…
NJrslv Sep 4, 2025
47d0d9c
[yagp_hooks_collector] Port backend infrastructure and adapt for Clou…
NJrslv Jan 19, 2026
d0ca75c
[yagp_hooks_collector] Add --with-yagp-hooks-collector configure opti…
NJrslv Jan 19, 2026
4c6b114
[yagp_hooks_collector] Add consistent GUC filtering and submit/done h…
NJrslv Jan 19, 2026
ea705d9
[yagp_hooks_collector] Add UDS round-trip test and fix send() accounting
NJrslv Jan 20, 2026
3eda4ae
[yagp_hooks_collector] Fix locale-dependent normalization crash
NJrslv Jan 21, 2026
6c98695
[yagp_hooks_collector] Add Apache license headers and enable -Werror
NJrslv Jan 21, 2026
9e01807
[yagp_hooks_collector] Fix null ErrorData dereference on segments
NJrslv Feb 10, 2026
c80d761
[yagp_hooks_collector] Move to gpcontrib directory
Mar 18, 2026
24fd1d1
[gp_stats_collector] Rename yagp_hooks_collector to gp_stats_collector
NJrslv Mar 25, 2026
5a98162
[gp_stats_collector] Simplify Makefile and add -Wno-unused-but-set-va…
NJrslv Mar 26, 2026
b8ae0fc
[gp_stats_collector] Build by default with extension disabled via GUCs
NJrslv Mar 31, 2026
1c25757
[gp_stats_collector] Code quality cleanup
NJrslv Mar 31, 2026
6a84528
[gp_stats_collector] Wrap hook call in try/catch on error path
NJrslv Mar 31, 2026
157f1da
[gp_stats_collector] Adapt namings for Cloudberry
NJrslv Mar 31, 2026
d5b88c6
[gp_stats_collector] Remove unnecessary CONFIGURE_EXTRA_OPTS param
NJrslv Apr 1, 2026
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
29 changes: 29 additions & 0 deletions .github/workflows/build-cloudberry-rocky8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ jobs:
"gpcontrib/gp_sparse_vector:installcheck",
"gpcontrib/gp_toolkit:installcheck"]
},
{"test":"gpcontrib-gp-stats-collector",
"make_configs":["gpcontrib/gp_stats_collector:installcheck"],
"extension":"gp_stats_collector"
},
{"test":"ic-fixme",
"make_configs":["src/test/regress:installcheck-fixme"],
"enable_core_check":false
Expand Down Expand Up @@ -1400,6 +1404,7 @@ jobs:
if: success() && needs.check-skip.outputs.should_skip != 'true'
env:
SRC_DIR: ${{ github.workspace }}
BUILD_DESTINATION: /usr/local/cloudberry-db
shell: bash {0}
run: |
set -o pipefail
Expand All @@ -1423,6 +1428,30 @@ jobs:
# 2. Follow the same pattern as optimizer
# 3. Update matrix entries to include the new setting

# Create extension if required
if [[ "${{ matrix.extension != '' }}" == "true" ]]; then
case "${{ matrix.extension }}" in
gp_stats_collector)
if ! su - gpadmin -c "source ${BUILD_DESTINATION}/cloudberry-env.sh && \
source ${SRC_DIR}/gpAux/gpdemo/gpdemo-env.sh && \
gpconfig -c shared_preload_libraries -v 'gp_stats_collector' && \
gpstop -ra && \
echo 'CREATE EXTENSION IF NOT EXISTS gp_stats_collector; \
SHOW shared_preload_libraries; \
TABLE pg_extension;' | \
psql postgres"
then
echo "Error creating gp_stats_collector extension"
exit 1
fi
;;
*)
echo "Unknown extension: ${{ matrix.extension }}"
exit 1
;;
esac
fi

# Set PostgreSQL options if defined
PG_OPTS=""
if [[ "${{ matrix.pg_settings.optimizer != '' }}" == "true" ]]; then
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/build-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ jobs:
},
"enable_core_check":false
},
{"test":"gpcontrib-gp-stats-collector",
"make_configs":["gpcontrib/gp_stats_collector:installcheck"],
"extension":"gp_stats_collector"
},
{"test":"ic-expandshrink",
"make_configs":["src/test/isolation2:installcheck-expandshrink"]
},
Expand Down Expand Up @@ -1403,6 +1407,7 @@ jobs:
if: success() && needs.check-skip.outputs.should_skip != 'true'
env:
SRC_DIR: ${{ github.workspace }}
BUILD_DESTINATION: /usr/local/cloudberry-db
shell: bash {0}
run: |
set -o pipefail
Expand Down Expand Up @@ -1432,6 +1437,30 @@ jobs:
PG_OPTS="$PG_OPTS -c optimizer=${{ matrix.pg_settings.optimizer }}"
fi

# Create extension if required
if [[ "${{ matrix.extension != '' }}" == "true" ]]; then
case "${{ matrix.extension }}" in
gp_stats_collector)
if ! su - gpadmin -c "source ${BUILD_DESTINATION}/cloudberry-env.sh && \
source ${SRC_DIR}/gpAux/gpdemo/gpdemo-env.sh && \
gpconfig -c shared_preload_libraries -v 'gp_stats_collector' && \
gpstop -ra && \
echo 'CREATE EXTENSION IF NOT EXISTS gp_stats_collector; \
SHOW shared_preload_libraries; \
TABLE pg_extension;' | \
psql postgres"
then
echo "Error creating gp_stats_collector extension"
exit 1
fi
;;
*)
echo "Unknown extension: ${{ matrix.extension }}"
exit 1
;;
esac
fi

if [[ "${{ matrix.pg_settings.default_table_access_method != '' }}" == "true" ]]; then
PG_OPTS="$PG_OPTS -c default_table_access_method=${{ matrix.pg_settings.default_table_access_method }}"
fi
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/build-deb-cloudberry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ jobs:
"gpcontrib/gp_sparse_vector:installcheck",
"gpcontrib/gp_toolkit:installcheck"]
},
{"test":"gpcontrib-gp-stats-collector",
"make_configs":["gpcontrib/gp_stats_collector:installcheck"],
"extension":"gp_stats_collector"
},
{"test":"ic-cbdb-parallel",
"make_configs":["src/test/regress:installcheck-cbdb-parallel"]
}
Expand Down Expand Up @@ -1341,6 +1345,7 @@ jobs:
if: success() && needs.check-skip.outputs.should_skip != 'true'
env:
SRC_DIR: ${{ github.workspace }}
BUILD_DESTINATION: ${{ github.workspace }}/debian/build
shell: bash {0}
run: |
set -o pipefail
Expand All @@ -1365,6 +1370,30 @@ jobs:
# 3. Update matrix entries to include the new setting


# Create extension if required
if [[ "${{ matrix.extension != '' }}" == "true" ]]; then
case "${{ matrix.extension }}" in
gp_stats_collector)
if ! su - gpadmin -c "source ${BUILD_DESTINATION}/cloudberry-env.sh && \
source ${SRC_DIR}/gpAux/gpdemo/gpdemo-env.sh && \
gpconfig -c shared_preload_libraries -v 'gp_stats_collector' && \
gpstop -ra && \
echo 'CREATE EXTENSION IF NOT EXISTS gp_stats_collector; \
SHOW shared_preload_libraries; \
TABLE pg_extension;' | \
psql postgres"
then
echo "Error creating gp_stats_collector extension"
exit 1
fi
;;
*)
echo "Unknown extension: ${{ matrix.extension }}"
exit 1
;;
esac
fi

# Set PostgreSQL options if defined
PG_OPTS=""
if [[ "${{ matrix.pg_settings.optimizer != '' }}" == "true" ]]; then
Expand Down
28 changes: 28 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ with_apr_config
with_libcurl
with_rt
with_zstd
with_gp_stats_collector
with_libbz2
LZ4_LIBS
LZ4_CFLAGS
Expand Down Expand Up @@ -942,6 +943,7 @@ with_zlib
with_lz4
with_libbz2
with_zstd
with_gp_stats_collector
with_rt
with_libcurl
with_apr_config
Expand Down Expand Up @@ -11150,6 +11152,32 @@ $as_echo "yes" >&6; }
fi
fi

#
# gp_stats_collector
#



# Check whether --with-gp-stats-collector was given.
if test "${with_gp_stats_collector+set}" = set; then :
withval=$with_gp_stats_collector;
case $withval in
yes)
:
;;
no)
:
;;
*)
as_fn_error $? "no argument expected for --with-gp-stats-collector option" "$LINENO" 5
;;
esac

else
with_gp_stats_collector=no

fi

#
# Realtime library
#
Expand Down
18 changes: 18 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,24 @@ PGAC_ARG_BOOL(with, zstd, yes, [do not build with Zstandard],
AC_MSG_RESULT([$with_zstd])
AC_SUBST(with_zstd)

#
# gp_stats_collector
#
PGAC_ARG_BOOL(with, gp_stats_collector, no,
[build with stats collector extension])
AC_SUBST(with_gp_stats_collector)

if test "$with_gp_stats_collector" = yes; then
PKG_CHECK_MODULES([PROTOBUF], [protobuf >= 3.0.0],
[],
[AC_MSG_ERROR([protobuf >= 3.0.0 is required for gp_stats_collector])]
)
AC_PATH_PROG([PROTOC], [protoc], [no])
if test "$PROTOC" = no; then
AC_MSG_ERROR([protoc is required for gp_stats_collector but was not found in PATH])
fi
fi

if test "$with_zstd" = yes; then
dnl zstd_errors.h was renamed from error_public.h in v1.4.0
PKG_CHECK_MODULES([ZSTD], [libzstd >= 1.4.0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ execute_cmd ./configure --prefix=${BUILD_DESTINATION} \
--disable-pxf \
--enable-tap-tests \
${CONFIGURE_DEBUG_OPTS} \
--with-gp-stats-collector \
--with-gssapi \
--with-ldap \
--with-libxml \
Expand Down
3 changes: 3 additions & 0 deletions gpcontrib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ else
diskquota
endif

ifeq "$(with_gp_stats_collector)" "yes"
recurse_targets += gp_stats_collector
endif
ifeq "$(with_zstd)" "yes"
recurse_targets += zstd
endif
Expand Down
Loading
Loading