This is an automated email from the ASF dual-hosted git repository. djwang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 52b2f5395431f4c2ce243a1518f667dd377e947f Author: Leonid Borchuk <[email protected]> AuthorDate: Wed Mar 18 15:17:52 2026 +0000 [yagp_hooks_collector] Move to gpcontrib directory --- .../yagp_hooks_collector/.clang-format | 0 gpcontrib/yagp_hooks_collector/README.md | 28 ++++++++++++++++++++++ .../expected}/yagp_cursors.out | 0 .../yagp_hooks_collector/expected}/yagp_dist.out | 0 .../expected}/yagp_guc_cache.out | 0 .../yagp_hooks_collector/expected}/yagp_locale.out | 0 .../yagp_hooks_collector/expected}/yagp_select.out | 0 .../yagp_hooks_collector/expected}/yagp_uds.out | 0 .../expected}/yagp_utf8_trim.out | 0 .../expected}/yagp_utility.out | 0 .../yagp_hooks_collector/metric.md | 0 .../protos}/yagpcc_metrics.proto | 0 .../yagp_hooks_collector/protos}/yagpcc_plan.proto | 0 .../protos}/yagpcc_set_service.proto | 0 .../yagp_hooks_collector/sql}/yagp_cursors.sql | 0 .../yagp_hooks_collector/sql}/yagp_dist.sql | 0 .../yagp_hooks_collector/sql}/yagp_guc_cache.sql | 0 .../yagp_hooks_collector/sql}/yagp_locale.sql | 0 .../yagp_hooks_collector/sql}/yagp_select.sql | 0 .../yagp_hooks_collector/sql}/yagp_uds.sql | 0 .../yagp_hooks_collector/sql}/yagp_utf8_trim.sql | 0 .../yagp_hooks_collector/sql}/yagp_utility.sql | 0 .../yagp_hooks_collector/src}/Config.cpp | 0 .../yagp_hooks_collector/src}/Config.h | 0 .../yagp_hooks_collector/src}/EventSender.cpp | 0 .../yagp_hooks_collector/src}/EventSender.h | 0 .../yagp_hooks_collector/src}/PgUtils.cpp | 0 .../yagp_hooks_collector/src}/PgUtils.h | 0 .../yagp_hooks_collector/src}/ProcStats.cpp | 0 .../yagp_hooks_collector/src}/ProcStats.h | 0 .../yagp_hooks_collector/src}/ProtoUtils.cpp | 0 .../yagp_hooks_collector/src}/ProtoUtils.h | 0 .../yagp_hooks_collector/src}/UDSConnector.cpp | 0 .../yagp_hooks_collector/src}/UDSConnector.h | 0 .../yagp_hooks_collector/src}/YagpStat.cpp | 0 .../yagp_hooks_collector/src}/YagpStat.h | 0 .../yagp_hooks_collector/src}/hook_wrappers.cpp | 0 .../yagp_hooks_collector/src}/hook_wrappers.h | 0 .../yagp_hooks_collector/src}/log/LogOps.cpp | 0 .../yagp_hooks_collector/src}/log/LogOps.h | 0 .../yagp_hooks_collector/src}/log/LogSchema.cpp | 0 .../yagp_hooks_collector/src}/log/LogSchema.h | 0 .../src}/memory/gpdbwrappers.cpp | 0 .../src}/memory/gpdbwrappers.h | 0 .../src}/stat_statements_parser/README.md | 0 .../pg_stat_statements_ya_parser.c | 0 .../pg_stat_statements_ya_parser.h | 0 .../src}/yagp_hooks_collector.c | 0 .../yagp_hooks_collector--1.0--1.1.sql | 0 .../yagp_hooks_collector--1.0.sql | 0 .../yagp_hooks_collector--1.1.sql | 0 .../yagp_hooks_collector.control | 0 src/stat_statements_parser/README.MD | 1 - 53 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.clang-format b/gpcontrib/yagp_hooks_collector/.clang-format similarity index 100% rename from .clang-format rename to gpcontrib/yagp_hooks_collector/.clang-format diff --git a/gpcontrib/yagp_hooks_collector/README.md b/gpcontrib/yagp_hooks_collector/README.md new file mode 100644 index 00000000000..9f465a190cb --- /dev/null +++ b/gpcontrib/yagp_hooks_collector/README.md @@ -0,0 +1,28 @@ +## YAGP Hooks Collector + +An extension for collecting greenplum query execution metrics and reporting them to an external agent. + +### Collected Statistics + +#### 1. Query Lifecycle +- **What:** Captures query text, normalized query text, timestamps (submit, start, end, done), and user/database info. +- **GUC:** `yagpcc.enable`. + +#### 2. `EXPLAIN` data +- **What:** Triggers generation of the `EXPLAIN (TEXT, COSTS, VERBOSE)` and captures it. +- **GUC:** `yagpcc.enable`. + +#### 3. `EXPLAIN ANALYZE` data +- **What:** Triggers generation of the `EXPLAIN (TEXT, ANALYZE, BUFFERS, TIMING, VERBOSE)` and captures it. +- **GUCs:** `yagpcc.enable`, `yagpcc.min_analyze_time`, `yagpcc.enable_cdbstats`(ANALYZE), `yagpcc.enable_analyze`(BUFFERS, TIMING, VERBOSE). + +#### 4. Other Metrics +- **What:** Captures Instrument, Greenplum, System, Network, Interconnect, Spill metrics. +- **GUC:** `yagpcc.enable`. + +### General Configuration +- **Nested Queries:** When `yagpcc.report_nested_queries` is `false`, only top-level queries are reported from the coordinator and segments, when `true`, both top-level and nested queries are reported from the coordinator, from segments collected as aggregates. +- **Data Destination:** All collected data is sent to a Unix Domain Socket. Configure the path with `yagpcc.uds_path`. +- **User Filtering:** To exclude activity from certain roles, add them to the comma-separated list in `yagpcc.ignored_users_list`. +- **Trimming plans:** Query texts and execution plans are trimmed based on `yagpcc.max_text_size` and `yagpcc.max_plan_size` (default: 1024KB). For now, it is not recommended to set these GUCs higher than 1024KB. +- **Analyze collection:** Analyze is sent if execution time exceeds `yagpcc.min_analyze_time`, which is 10 seconds by default. Analyze is collected if `yagpcc.enable_analyze` is true. diff --git a/expected/yagp_cursors.out b/gpcontrib/yagp_hooks_collector/expected/yagp_cursors.out similarity index 100% rename from expected/yagp_cursors.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_cursors.out diff --git a/expected/yagp_dist.out b/gpcontrib/yagp_hooks_collector/expected/yagp_dist.out similarity index 100% rename from expected/yagp_dist.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_dist.out diff --git a/expected/yagp_guc_cache.out b/gpcontrib/yagp_hooks_collector/expected/yagp_guc_cache.out similarity index 100% rename from expected/yagp_guc_cache.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_guc_cache.out diff --git a/expected/yagp_locale.out b/gpcontrib/yagp_hooks_collector/expected/yagp_locale.out similarity index 100% rename from expected/yagp_locale.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_locale.out diff --git a/expected/yagp_select.out b/gpcontrib/yagp_hooks_collector/expected/yagp_select.out similarity index 100% rename from expected/yagp_select.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_select.out diff --git a/expected/yagp_uds.out b/gpcontrib/yagp_hooks_collector/expected/yagp_uds.out similarity index 100% rename from expected/yagp_uds.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_uds.out diff --git a/expected/yagp_utf8_trim.out b/gpcontrib/yagp_hooks_collector/expected/yagp_utf8_trim.out similarity index 100% rename from expected/yagp_utf8_trim.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_utf8_trim.out diff --git a/expected/yagp_utility.out b/gpcontrib/yagp_hooks_collector/expected/yagp_utility.out similarity index 100% rename from expected/yagp_utility.out rename to gpcontrib/yagp_hooks_collector/expected/yagp_utility.out diff --git a/metric.md b/gpcontrib/yagp_hooks_collector/metric.md similarity index 100% rename from metric.md rename to gpcontrib/yagp_hooks_collector/metric.md diff --git a/protos/yagpcc_metrics.proto b/gpcontrib/yagp_hooks_collector/protos/yagpcc_metrics.proto similarity index 100% rename from protos/yagpcc_metrics.proto rename to gpcontrib/yagp_hooks_collector/protos/yagpcc_metrics.proto diff --git a/protos/yagpcc_plan.proto b/gpcontrib/yagp_hooks_collector/protos/yagpcc_plan.proto similarity index 100% rename from protos/yagpcc_plan.proto rename to gpcontrib/yagp_hooks_collector/protos/yagpcc_plan.proto diff --git a/protos/yagpcc_set_service.proto b/gpcontrib/yagp_hooks_collector/protos/yagpcc_set_service.proto similarity index 100% rename from protos/yagpcc_set_service.proto rename to gpcontrib/yagp_hooks_collector/protos/yagpcc_set_service.proto diff --git a/sql/yagp_cursors.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_cursors.sql similarity index 100% rename from sql/yagp_cursors.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_cursors.sql diff --git a/sql/yagp_dist.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_dist.sql similarity index 100% rename from sql/yagp_dist.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_dist.sql diff --git a/sql/yagp_guc_cache.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_guc_cache.sql similarity index 100% rename from sql/yagp_guc_cache.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_guc_cache.sql diff --git a/sql/yagp_locale.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_locale.sql similarity index 100% rename from sql/yagp_locale.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_locale.sql diff --git a/sql/yagp_select.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_select.sql similarity index 100% rename from sql/yagp_select.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_select.sql diff --git a/sql/yagp_uds.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_uds.sql similarity index 100% rename from sql/yagp_uds.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_uds.sql diff --git a/sql/yagp_utf8_trim.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_utf8_trim.sql similarity index 100% rename from sql/yagp_utf8_trim.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_utf8_trim.sql diff --git a/sql/yagp_utility.sql b/gpcontrib/yagp_hooks_collector/sql/yagp_utility.sql similarity index 100% rename from sql/yagp_utility.sql rename to gpcontrib/yagp_hooks_collector/sql/yagp_utility.sql diff --git a/src/Config.cpp b/gpcontrib/yagp_hooks_collector/src/Config.cpp similarity index 100% rename from src/Config.cpp rename to gpcontrib/yagp_hooks_collector/src/Config.cpp diff --git a/src/Config.h b/gpcontrib/yagp_hooks_collector/src/Config.h similarity index 100% rename from src/Config.h rename to gpcontrib/yagp_hooks_collector/src/Config.h diff --git a/src/EventSender.cpp b/gpcontrib/yagp_hooks_collector/src/EventSender.cpp similarity index 100% rename from src/EventSender.cpp rename to gpcontrib/yagp_hooks_collector/src/EventSender.cpp diff --git a/src/EventSender.h b/gpcontrib/yagp_hooks_collector/src/EventSender.h similarity index 100% rename from src/EventSender.h rename to gpcontrib/yagp_hooks_collector/src/EventSender.h diff --git a/src/PgUtils.cpp b/gpcontrib/yagp_hooks_collector/src/PgUtils.cpp similarity index 100% rename from src/PgUtils.cpp rename to gpcontrib/yagp_hooks_collector/src/PgUtils.cpp diff --git a/src/PgUtils.h b/gpcontrib/yagp_hooks_collector/src/PgUtils.h similarity index 100% rename from src/PgUtils.h rename to gpcontrib/yagp_hooks_collector/src/PgUtils.h diff --git a/src/ProcStats.cpp b/gpcontrib/yagp_hooks_collector/src/ProcStats.cpp similarity index 100% rename from src/ProcStats.cpp rename to gpcontrib/yagp_hooks_collector/src/ProcStats.cpp diff --git a/src/ProcStats.h b/gpcontrib/yagp_hooks_collector/src/ProcStats.h similarity index 100% rename from src/ProcStats.h rename to gpcontrib/yagp_hooks_collector/src/ProcStats.h diff --git a/src/ProtoUtils.cpp b/gpcontrib/yagp_hooks_collector/src/ProtoUtils.cpp similarity index 100% rename from src/ProtoUtils.cpp rename to gpcontrib/yagp_hooks_collector/src/ProtoUtils.cpp diff --git a/src/ProtoUtils.h b/gpcontrib/yagp_hooks_collector/src/ProtoUtils.h similarity index 100% rename from src/ProtoUtils.h rename to gpcontrib/yagp_hooks_collector/src/ProtoUtils.h diff --git a/src/UDSConnector.cpp b/gpcontrib/yagp_hooks_collector/src/UDSConnector.cpp similarity index 100% rename from src/UDSConnector.cpp rename to gpcontrib/yagp_hooks_collector/src/UDSConnector.cpp diff --git a/src/UDSConnector.h b/gpcontrib/yagp_hooks_collector/src/UDSConnector.h similarity index 100% rename from src/UDSConnector.h rename to gpcontrib/yagp_hooks_collector/src/UDSConnector.h diff --git a/src/YagpStat.cpp b/gpcontrib/yagp_hooks_collector/src/YagpStat.cpp similarity index 100% rename from src/YagpStat.cpp rename to gpcontrib/yagp_hooks_collector/src/YagpStat.cpp diff --git a/src/YagpStat.h b/gpcontrib/yagp_hooks_collector/src/YagpStat.h similarity index 100% rename from src/YagpStat.h rename to gpcontrib/yagp_hooks_collector/src/YagpStat.h diff --git a/src/hook_wrappers.cpp b/gpcontrib/yagp_hooks_collector/src/hook_wrappers.cpp similarity index 100% rename from src/hook_wrappers.cpp rename to gpcontrib/yagp_hooks_collector/src/hook_wrappers.cpp diff --git a/src/hook_wrappers.h b/gpcontrib/yagp_hooks_collector/src/hook_wrappers.h similarity index 100% rename from src/hook_wrappers.h rename to gpcontrib/yagp_hooks_collector/src/hook_wrappers.h diff --git a/src/log/LogOps.cpp b/gpcontrib/yagp_hooks_collector/src/log/LogOps.cpp similarity index 100% rename from src/log/LogOps.cpp rename to gpcontrib/yagp_hooks_collector/src/log/LogOps.cpp diff --git a/src/log/LogOps.h b/gpcontrib/yagp_hooks_collector/src/log/LogOps.h similarity index 100% rename from src/log/LogOps.h rename to gpcontrib/yagp_hooks_collector/src/log/LogOps.h diff --git a/src/log/LogSchema.cpp b/gpcontrib/yagp_hooks_collector/src/log/LogSchema.cpp similarity index 100% rename from src/log/LogSchema.cpp rename to gpcontrib/yagp_hooks_collector/src/log/LogSchema.cpp diff --git a/src/log/LogSchema.h b/gpcontrib/yagp_hooks_collector/src/log/LogSchema.h similarity index 100% rename from src/log/LogSchema.h rename to gpcontrib/yagp_hooks_collector/src/log/LogSchema.h diff --git a/src/memory/gpdbwrappers.cpp b/gpcontrib/yagp_hooks_collector/src/memory/gpdbwrappers.cpp similarity index 100% rename from src/memory/gpdbwrappers.cpp rename to gpcontrib/yagp_hooks_collector/src/memory/gpdbwrappers.cpp diff --git a/src/memory/gpdbwrappers.h b/gpcontrib/yagp_hooks_collector/src/memory/gpdbwrappers.h similarity index 100% rename from src/memory/gpdbwrappers.h rename to gpcontrib/yagp_hooks_collector/src/memory/gpdbwrappers.h diff --git a/src/stat_statements_parser/README.md b/gpcontrib/yagp_hooks_collector/src/stat_statements_parser/README.md similarity index 100% rename from src/stat_statements_parser/README.md rename to gpcontrib/yagp_hooks_collector/src/stat_statements_parser/README.md diff --git a/src/stat_statements_parser/pg_stat_statements_ya_parser.c b/gpcontrib/yagp_hooks_collector/src/stat_statements_parser/pg_stat_statements_ya_parser.c similarity index 100% rename from src/stat_statements_parser/pg_stat_statements_ya_parser.c rename to gpcontrib/yagp_hooks_collector/src/stat_statements_parser/pg_stat_statements_ya_parser.c diff --git a/src/stat_statements_parser/pg_stat_statements_ya_parser.h b/gpcontrib/yagp_hooks_collector/src/stat_statements_parser/pg_stat_statements_ya_parser.h similarity index 100% rename from src/stat_statements_parser/pg_stat_statements_ya_parser.h rename to gpcontrib/yagp_hooks_collector/src/stat_statements_parser/pg_stat_statements_ya_parser.h diff --git a/src/yagp_hooks_collector.c b/gpcontrib/yagp_hooks_collector/src/yagp_hooks_collector.c similarity index 100% rename from src/yagp_hooks_collector.c rename to gpcontrib/yagp_hooks_collector/src/yagp_hooks_collector.c diff --git a/yagp_hooks_collector--1.0--1.1.sql b/gpcontrib/yagp_hooks_collector/yagp_hooks_collector--1.0--1.1.sql similarity index 100% rename from yagp_hooks_collector--1.0--1.1.sql rename to gpcontrib/yagp_hooks_collector/yagp_hooks_collector--1.0--1.1.sql diff --git a/yagp_hooks_collector--1.0.sql b/gpcontrib/yagp_hooks_collector/yagp_hooks_collector--1.0.sql similarity index 100% rename from yagp_hooks_collector--1.0.sql rename to gpcontrib/yagp_hooks_collector/yagp_hooks_collector--1.0.sql diff --git a/yagp_hooks_collector--1.1.sql b/gpcontrib/yagp_hooks_collector/yagp_hooks_collector--1.1.sql similarity index 100% rename from yagp_hooks_collector--1.1.sql rename to gpcontrib/yagp_hooks_collector/yagp_hooks_collector--1.1.sql diff --git a/yagp_hooks_collector.control b/gpcontrib/yagp_hooks_collector/yagp_hooks_collector.control similarity index 100% rename from yagp_hooks_collector.control rename to gpcontrib/yagp_hooks_collector/yagp_hooks_collector.control diff --git a/src/stat_statements_parser/README.MD b/src/stat_statements_parser/README.MD deleted file mode 100644 index 291e31a3099..00000000000 --- a/src/stat_statements_parser/README.MD +++ /dev/null @@ -1 +0,0 @@ -This directory contains a slightly modified subset of pg_stat_statements for PG v9.4 to be used in query and plan ID generation. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
