Merge pull request #582 from percona/release-2.3.1

PGSM 2.3.1 release
main
Artem Gavrilov 2025-12-01 18:00:54 +02:00 committed by GitHub
commit 71b045b3a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 17 deletions

View File

@ -2,7 +2,7 @@
"name": "pg_stat_monitor",
"abstract": "PostgreSQL Query Performance Monitoring Tool",
"description": "pg_stat_monitor is a PostgreSQL Query Performance Monitoring tool, based on PostgreSQL's contrib module pg_stat_statements. PostgreSQLs pg_stat_statements provides the basic statistics, which is sometimes not enough. The major shortcoming in pg_stat_statements is that it accumulates all the queries and their statistics and does not provide aggregated statistics nor histogram information. In this case, a user would need to calculate the aggregates, which is quite an expensive operation.",
"version": "2.3.0",
"version": "2.3.1",
"maintainer": [
"Artem Gavrilov <artem.gavrilov@percona.com>",
"Diego dos Santos Fronza <diego.fronza@percona.com>"
@ -15,7 +15,7 @@
"abstract": "PostgreSQL Query Performance Monitoring Tool",
"file": "pg_stat_monitor--2.2--2.3.sql",
"docfile": "README.md",
"version": "2.3.0"
"version": "2.3.1"
}
},
"prereqs": {

View File

@ -213,12 +213,12 @@ install_deps() {
if [ x"$RHEL" = x8 ];
then
clang_version=$(yum list --showduplicates clang-devel | grep "17.0" | grep clang | awk '{print $2}' | head -n 1)
llvm_version=$(yum list --showduplicates llvm-devel | grep "17.0" | grep llvm | awk '{print $2}' | head -n 1)
yum install -y clang-devel-${clang_version} clang-${clang_version} llvm-devel-${llvm_version}
dnf module -y disable llvm-toolset
clang_version=$(yum list --showduplicates clang-devel | grep "20.1" | grep clang | awk '{print $2}' | head -n 1)
llvm_version=$(yum list --showduplicates llvm-devel | grep "20.1" | grep llvm | awk '{print $2}' | head -n 1)
yum install -y clang-devel-${clang_version} clang-${clang_version} llvm-devel-${llvm_version}
dnf module disable -y rust-toolset llvm-toolset
else
yum install -y clang-devel clang llvm-devel
yum install -y clang-devel clang llvm-devel
fi
PKGLIST="percona-postgresql${PG_RELEASE}-devel"

View File

@ -43,7 +43,7 @@ typedef enum pgsmVersion
PG_MODULE_MAGIC;
#define BUILD_VERSION "2.3.0"
#define BUILD_VERSION "2.3.1"
/* Number of output arguments (columns) for various API versions */
#define PG_STAT_MONITOR_COLS_V1_0 52
@ -82,7 +82,6 @@ void _PG_init(void);
/* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */
static int nesting_level = 0;
volatile bool __pgsm_do_not_capture_error = false;
#if PG_VERSION_NUM < 170000
/* Before planner nesting level was conunted separately */
@ -98,10 +97,10 @@ static int hist_bucket_count_total;
static uint32 pgsm_client_ip = PGSM_INVALID_IP_MASK;
/* The array to store outer layer query id*/
int64 *nested_queryids;
char **nested_query_txts;
List *lentries = NIL;
/* The array to store outer layer query id */
static int64 *nested_queryids;
static char **nested_query_txts;
static List *lentries = NIL;
static char relations[REL_LST][REL_LEN];
@ -211,12 +210,12 @@ static void pgsm_cleanup_callback(void *arg);
static void pgsm_store_error(const char *query, ErrorData *edata);
/*---- Local variables ----*/
MemoryContextCallback mem_cxt_reset_callback =
static MemoryContextCallback mem_cxt_reset_callback =
{
.func = pgsm_cleanup_callback,
.arg = NULL
};
volatile bool callback_setup = false;
static volatile bool callback_setup = false;
static void pgsm_update_entry(pgsmEntry *entry,
const char *query,
@ -343,7 +342,7 @@ _PG_init(void)
ExecutorCheckPerms_hook = HOOK(pgsm_ExecutorCheckPerms);
nested_queryids = (int64 *) malloc(sizeof(int64) * max_stack_depth);
nested_query_txts = (char **) malloc(sizeof(char *) * max_stack_depth);
nested_query_txts = (char **) calloc(max_stack_depth, sizeof(char *));
system_init = true;
}

View File

@ -2,7 +2,7 @@ CREATE EXTENSION pg_stat_monitor;
SELECT pg_stat_monitor_version();
pg_stat_monitor_version
-------------------------
2.3.0
2.3.1
(1 row)
DROP EXTENSION pg_stat_monitor;