Compare commits

...

4 Commits
2.3.1 ... main

Author SHA1 Message Date
Artem Gavrilov 71b045b3a4
Merge pull request #582 from percona/release-2.3.1
PGSM 2.3.1 release
2025-12-01 18:00:54 +02:00
Andrei V. Lepikhov 133432ed92 Fix annoying compilation warnings 2025-12-01 17:26:48 +02:00
dependabot[bot] ff4c134e2a Bump actions/checkout from 5.0.0 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...1af3b93b68)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 16:14:52 +02:00
dependabot[bot] e01e159a7d Bump github/codeql-action from 4.31.2 to 4.31.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.2 to 4.31.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0499de31b9...fdbfb4d275)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 16:14:24 +02:00
24 changed files with 41 additions and 42 deletions

View File

@ -10,12 +10,12 @@ jobs:
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: src/pg_stat_monitor path: src/pg_stat_monitor
- name: Checkout cppcheck sources - name: Checkout cppcheck sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: "danmar/cppcheck" repository: "danmar/cppcheck"
ref: "2.13.4" ref: "2.13.4"
@ -43,13 +43,13 @@ jobs:
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_17_STABLE' ref: 'REL_17_STABLE'
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'contrib/pg_stat_monitor' path: 'contrib/pg_stat_monitor'
@ -87,7 +87,7 @@ jobs:
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Check license headers - name: Check license headers
uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0 uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0

View File

@ -16,7 +16,7 @@ jobs:
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_15_STABLE' ref: 'REL_15_STABLE'
@ -83,7 +83,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -22,7 +22,7 @@ jobs:
shell: bash shell: bash
- name: Check out - name: Check out
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
ref: '${{ inputs.version }}' ref: '${{ inputs.version }}'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_13_STABLE' ref: 'REL_13_STABLE'
@ -83,7 +83,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_14_STABLE' ref: 'REL_14_STABLE'
@ -83,7 +83,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_15_STABLE' ref: 'REL_15_STABLE'
@ -83,7 +83,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_16_STABLE' ref: 'REL_16_STABLE'
@ -83,7 +83,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_17_STABLE' ref: 'REL_17_STABLE'
@ -83,7 +83,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone postgres repository - name: Clone postgres repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
repository: 'postgres/postgres' repository: 'postgres/postgres'
ref: 'REL_18_STABLE' ref: 'REL_18_STABLE'
@ -83,7 +83,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone pg_stat_monitor repository - name: Clone pg_stat_monitor repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
path: 'src/pg_stat_monitor' path: 'src/pg_stat_monitor'

View File

@ -23,7 +23,7 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with: with:
persist-credentials: false persist-credentials: false
@ -43,6 +43,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional). # Upload the results to GitHub's code scanning dashboard (optional).
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2 uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@ -82,7 +82,6 @@ void _PG_init(void);
/* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */ /* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */
static int nesting_level = 0; static int nesting_level = 0;
volatile bool __pgsm_do_not_capture_error = false;
#if PG_VERSION_NUM < 170000 #if PG_VERSION_NUM < 170000
/* Before planner nesting level was conunted separately */ /* 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; static uint32 pgsm_client_ip = PGSM_INVALID_IP_MASK;
/* The array to store outer layer query id*/ /* The array to store outer layer query id */
int64 *nested_queryids; static int64 *nested_queryids;
char **nested_query_txts; static char **nested_query_txts;
List *lentries = NIL; static List *lentries = NIL;
static char relations[REL_LST][REL_LEN]; 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); static void pgsm_store_error(const char *query, ErrorData *edata);
/*---- Local variables ----*/ /*---- Local variables ----*/
MemoryContextCallback mem_cxt_reset_callback = static MemoryContextCallback mem_cxt_reset_callback =
{ {
.func = pgsm_cleanup_callback, .func = pgsm_cleanup_callback,
.arg = NULL .arg = NULL
}; };
volatile bool callback_setup = false; static volatile bool callback_setup = false;
static void pgsm_update_entry(pgsmEntry *entry, static void pgsm_update_entry(pgsmEntry *entry,
const char *query, const char *query,