Skip to content

Commit 71b045b

Browse files
Merge pull request #582 from percona/release-2.3.1
PGSM 2.3.1 release
2 parents ff4c134 + 133432e commit 71b045b

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

META.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pg_stat_monitor",
33
"abstract": "PostgreSQL Query Performance Monitoring Tool",
44
"description": "pg_stat_monitor is a PostgreSQL Query Performance Monitoring tool, based on PostgreSQL's contrib module pg_stat_statements. PostgreSQL’s 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.",
5-
"version": "2.3.0",
5+
"version": "2.3.1",
66
"maintainer": [
77
"Artem Gavrilov <[email protected]>",
88
"Diego dos Santos Fronza <[email protected]>"
@@ -15,7 +15,7 @@
1515
"abstract": "PostgreSQL Query Performance Monitoring Tool",
1616
"file": "pg_stat_monitor--2.2--2.3.sql",
1717
"docfile": "README.md",
18-
"version": "2.3.0"
18+
"version": "2.3.1"
1919
}
2020
},
2121
"prereqs": {

percona-packaging/scripts/pg_stat_monitor_builder.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ install_deps() {
213213

214214
if [ x"$RHEL" = x8 ];
215215
then
216-
clang_version=$(yum list --showduplicates clang-devel | grep "17.0" | grep clang | awk '{print $2}' | head -n 1)
217-
llvm_version=$(yum list --showduplicates llvm-devel | grep "17.0" | grep llvm | awk '{print $2}' | head -n 1)
218-
yum install -y clang-devel-${clang_version} clang-${clang_version} llvm-devel-${llvm_version}
219-
dnf module -y disable llvm-toolset
216+
clang_version=$(yum list --showduplicates clang-devel | grep "20.1" | grep clang | awk '{print $2}' | head -n 1)
217+
llvm_version=$(yum list --showduplicates llvm-devel | grep "20.1" | grep llvm | awk '{print $2}' | head -n 1)
218+
yum install -y clang-devel-${clang_version} clang-${clang_version} llvm-devel-${llvm_version}
219+
dnf module disable -y rust-toolset llvm-toolset
220220
else
221-
yum install -y clang-devel clang llvm-devel
221+
yum install -y clang-devel clang llvm-devel
222222
fi
223223

224224
PKGLIST="percona-postgresql${PG_RELEASE}-devel"

pg_stat_monitor.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef enum pgsmVersion
4343

4444
PG_MODULE_MAGIC;
4545

46-
#define BUILD_VERSION "2.3.0"
46+
#define BUILD_VERSION "2.3.1"
4747

4848
/* Number of output arguments (columns) for various API versions */
4949
#define PG_STAT_MONITOR_COLS_V1_0 52
@@ -82,7 +82,6 @@ void _PG_init(void);
8282

8383
/* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */
8484
static int nesting_level = 0;
85-
volatile bool __pgsm_do_not_capture_error = false;
8685

8786
#if PG_VERSION_NUM < 170000
8887
/* Before planner nesting level was conunted separately */
@@ -98,10 +97,10 @@ static int hist_bucket_count_total;
9897

9998
static uint32 pgsm_client_ip = PGSM_INVALID_IP_MASK;
10099

101-
/* The array to store outer layer query id*/
102-
int64 *nested_queryids;
103-
char **nested_query_txts;
104-
List *lentries = NIL;
100+
/* The array to store outer layer query id */
101+
static int64 *nested_queryids;
102+
static char **nested_query_txts;
103+
static List *lentries = NIL;
105104

106105
static char relations[REL_LST][REL_LEN];
107106

@@ -211,12 +210,12 @@ static void pgsm_cleanup_callback(void *arg);
211210
static void pgsm_store_error(const char *query, ErrorData *edata);
212211

213212
/*---- Local variables ----*/
214-
MemoryContextCallback mem_cxt_reset_callback =
213+
static MemoryContextCallback mem_cxt_reset_callback =
215214
{
216215
.func = pgsm_cleanup_callback,
217216
.arg = NULL
218217
};
219-
volatile bool callback_setup = false;
218+
static volatile bool callback_setup = false;
220219

221220
static void pgsm_update_entry(pgsmEntry *entry,
222221
const char *query,
@@ -343,7 +342,7 @@ _PG_init(void)
343342
ExecutorCheckPerms_hook = HOOK(pgsm_ExecutorCheckPerms);
344343

345344
nested_queryids = (int64 *) malloc(sizeof(int64) * max_stack_depth);
346-
nested_query_txts = (char **) malloc(sizeof(char *) * max_stack_depth);
345+
nested_query_txts = (char **) calloc(max_stack_depth, sizeof(char *));
347346

348347
system_init = true;
349348
}

regression/expected/version.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CREATE EXTENSION pg_stat_monitor;
22
SELECT pg_stat_monitor_version();
33
pg_stat_monitor_version
44
-------------------------
5-
2.3.0
5+
2.3.1
66
(1 row)
77

88
DROP EXTENSION pg_stat_monitor;

0 commit comments

Comments
 (0)