Commit Graph

765 Commits (acd559842fb35a7ab307a2c5e74c741e5d8f309e)

Author SHA1 Message Date
dependabot[bot] acd559842f
Bump actions/upload-artifact from 4.6.1 to 4.6.2 (#526)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](4cec3d8aa0...ea165f8d65)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:22:24 +02:00
Muhammad Aqeel 8bbb49e409
Adds date timestamp to keep packages in different directories. (#527) 2025-03-27 16:31:25 +05:00
dependabot[bot] 7bddd5a033
Bump github/codeql-action from 3.28.10 to 3.28.11 (#524)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.10 to 3.28.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b56ba49b26...6bb031afdd)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 14:24:19 +02:00
dependabot[bot] 5312f6f8a7
Bump actions/upload-artifact from 4.6.0 to 4.6.1 (#523)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65c4c4a1dd...4cec3d8aa0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 12:26:33 +02:00
dependabot[bot] c305b8a086
Bump github/codeql-action from 3.28.9 to 3.28.10 (#522)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.9 to 3.28.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9e8d0789d4...b56ba49b26)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 12:25:58 +02:00
dependabot[bot] 8dcf24a879
Bump ossf/scorecard-action from 2.4.0 to 2.4.1 (#521)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](62b2cac7ed...f49aabe0b5)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 12:25:36 +02:00
dependabot[bot] 32b1beb6ff
Bump codecov/codecov-action from 5.3.1 to 5.4.0 (#520)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](13ce06bfc6...0565863a31)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 12:25:14 +02:00
Andreas Karlsson 9333608c3a PG-1349 Remove call to LWLockRelease() in PG_CATCH()
It is not safe to release an LWLock in a catch section without
incrementing InterruptHoldoffCount so let's isntead simply not release
the lock here.
2025-02-20 17:30:24 +01:00
Andreas Karlsson 4ebb3d1f36 PG-1349 Prevent LWLock deadlocks from happening
Instead of trying to fix every case where we could throw an error and
handling that properly we just make sure to disable the error capture
of the hook while our backend holds the lock.

We keep the check for IsSystemOOM() in the hook even though that might
not be relevant anymore because if we are in OOM it is not like there
would be any point to log the error anyway.

This is done via a global variable, similar to the
__pgsm_do_not_capture_error variable that we are replacing, which we
also use in one place to disable recursive calls to the log hook
where we do not hold the lock.

A potential future improvement would be to make this variable a counter,
or have two separate globals, so that we could guard against recursive
calls to the hook running us out of stack and not just prevent the
deadlocks.
2025-02-20 11:38:37 +01:00
Artem Gavrilov fd43b75153
Revert "PG-156: replace query placeholders with actual arguments for… (#517)
Revert "PG -156: replace query placeholders with actual arguments for prepared statements (#481)"

This reverts commit c921d483a8.
2025-02-17 19:13:15 +02:00
Artem Gavrilov c949d21656
Add OSSF best practices badge (#507) 2025-02-14 14:34:31 +02:00
dependabot[bot] fbdff8b444
Bump apache/skywalking-eyes from 0.6.0 to 0.7.0 (#512)
Bumps [apache/skywalking-eyes](https://github.com/apache/skywalking-eyes) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/apache/skywalking-eyes/releases)
- [Changelog](https://github.com/apache/skywalking-eyes/blob/main/CHANGES.md)
- [Commits](cd7b195c51...5c5b974209)

---
updated-dependencies:
- dependency-name: apache/skywalking-eyes
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-11 11:35:44 +02:00
dependabot[bot] e099628e18
Bump github/codeql-action from 3.28.8 to 3.28.9 (#513)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.8 to 3.28.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](dd746615b3...9e8d0789d4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-11 11:35:16 +02:00
dependabot[bot] d2b2eafc85
Bump github/codeql-action from 3.28.5 to 3.28.8 (#511)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.5 to 3.28.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f6091c0113...dd746615b3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 14:30:59 +02:00
dependabot[bot] ba8d7bd83b
Bump codecov/codecov-action from 5.1.2 to 5.3.1 (#509)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.1.2 to 5.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](1e68e06f1d...13ce06bfc6)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 16:04:20 +02:00
dependabot[bot] b47ae95fa8
Bump github/codeql-action from 3.28.1 to 3.28.5 (#510)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.1 to 3.28.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b6a472f63d...f6091c0113)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 16:03:56 +02:00
Artem Gavrilov 980116acea
Add issue assingees (#508) 2025-01-24 12:01:44 -03:00
dependabot[bot] ef9518c98e
Bump github/codeql-action from 3.28.0 to 3.28.1 (#504)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.0 to 3.28.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](48ab28a6f5...b6a472f63d)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 14:59:26 +02:00
dependabot[bot] 2769e6dcb2
Bump actions/upload-artifact from 4.5.0 to 4.6.0 (#505)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](6f51ac03b9...65c4c4a1dd)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 14:59:01 +02:00
dependabot[bot] d0b67ef32a
Bump github/codeql-action from 3.27.9 to 3.28.0 (#503)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.9 to 3.28.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](df409f7d92...48ab28a6f5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 19:38:41 +02:00
dependabot[bot] d008bbbfa7
Bump actions/upload-artifact from 4.4.3 to 4.5.0 (#502)
* Bump actions/upload-artifact from 4.4.3 to 4.5.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.4.3...6f51ac03b9356f520e9adb1b1b7802705f340c2b)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update .github/workflows/scorecard.yml

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Artem Gavrilov <artem.gavrilov@percona.com>
2024-12-23 19:38:15 +02:00
dependabot[bot] 971c62025e
Bump codecov/codecov-action from 5.1.1 to 5.1.2 (#501)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](7f8b4b4bde...1e68e06f1d)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 19:36:56 +02:00
dependabot[bot] 8ed7f1dbb7
Bump github/codeql-action from 3.27.6 to 3.27.9 (#499)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.6 to 3.27.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](aa57810251...df409f7d92)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 19:55:54 +02:00
dependabot[bot] 2a5a2f07c4
Bump github/codeql-action from 3.27.5 to 3.27.6 (#498)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.5 to 3.27.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f09c1c0a94...aa57810251)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 14:41:17 +02:00
dependabot[bot] 7d57e2476f
Bump codecov/codecov-action from 5.0.7 to 5.1.1 (#497)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.0.7 to 5.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](015f24e681...7f8b4b4bde)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 14:40:51 +02:00
dependabot[bot] 6c7512afa5
Bump codecov/codecov-action from 5.0.2 to 5.0.7 (#496)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.0.2 to 5.0.7.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](5c47607acb...015f24e681)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-25 21:21:02 +02:00
dependabot[bot] ee7f6d071f
Bump github/codeql-action from 3.27.4 to 3.27.5 (#495)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.4 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ea9e4e3799...f09c1c0a94)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-25 21:20:38 +02:00
Muhammad Aqeel 7f1344e12d
Fixes llvm-devel package installation issue. (#494) 2024-11-22 12:27:18 +05:00
Artem Gavrilov 85f0401b96
Create pull_request_template.md (#489) 2024-11-19 09:31:37 +01:00
dependabot[bot] df65136090
Bump codecov/codecov-action from 4.6.0 to 5.0.2 (#491)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.6.0 to 5.0.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](b9fd7d16f6...5c47607acb)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 22:21:04 +02:00
dependabot[bot] 534790f39b
Bump ossf/scorecard-action from 2.3.1 to 2.4.0 (#492)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 22:20:38 +02:00
dependabot[bot] 646f01420f
Bump github/codeql-action from 3.27.3 to 3.27.4 (#493)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.3 to 3.27.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](396bb3e453...ea9e4e3799)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 22:20:11 +02:00
dependabot[bot] c63e172100
Bump actions/checkout from 4.1.1 to 4.2.2 (#490)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.1...11bd71901bbe5b1630ceea73d27597364c9af683)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 22:19:34 +02:00
StepSecurity Bot 091b5866d4
[StepSecurity] ci: Harden GitHub Actions (#488)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-11-14 15:19:16 +02:00
Artem Gavrilov 186c2e4795
Add OSSF Scorecard (#487)
* Create scorecard.yml

* Add OSSF scorecard badge

* Update README.md
2024-11-14 11:11:37 +02:00
Diego Fronza c921d483a8
PG -156: replace query placeholders with actual arguments for prepared statements (#481)
* Denormalize prepared statement queries

Added support for extracting query arguments for prepared statements
when `pg_stat_monitor.pgsm_normalized_query` is off.

Previously pg_stat_monitor was unable to extract the arguments for
prepared statements, thus leaving queries with placeholders $1
.. $N instead of the actual arguments.

* Optmize query denormalization

Instead of copying original query text byte by byte, copy data between
query placeholders in chunks, example:

`INSERT INTO foo(a, b, c) VALUES('test', 100, 'test again)'`

Would result in normalized query:

`INSERT INTO foo(a, b, c) VALUES($1, $2, $3)`

The original patch would copy the parts between placeholders byte by
byte, e.g. `INSERT INTO foo(a, b, c) VALUES(`, instead we can copy this
whole block at once, 1 function call and maybe 1 buffer re-allocation
per call.

Also make use of `appendBinaryStringInfo` to avoid calculating string
length as we have this info already.

* Optmize query denormalization(2)

Avoid allocating an array of strings for extracting query argument
values, instead append the current parameter value directly in the
buffer used to store the denormalized query.

This avoids not only unnecessary memory allocations, but also copying
data between temporary memory and the buffer.

* Store denormalized query only under certain constraints

This commit introduces a little optimization along with a feature, it
stores the query in denormalized form only under the circumstances
below:

- The psgm_normalized_query GUC is disabled (off).
- The query is seem for the first time, or the query total
  execution time exceeds the mean execution time calculated for
  the previous queries.

Having the query which took most execution time along with it's
arguments could help users in further investigating performance issues.

* Fix regression tests

When query normalization is disabled utility queries like SELECT 10+20
are now stored as is, instead of SELECT $1+$2.

Also when functions or sub queries are created the arguments used
internally by the function or subqueries will be replaced by NULL instead
of $1..$N. The actual arguments will be displayed when the function or
subquery is actually invoked.

* Add query denormalization regression test for prepared statements

Ensures that the denormalization of prepared statements is working, also
ensure that a query which takes more time to execute replaces the
previous denormalized query.

* Updated pgsm_query_id regression tests

With the query dernomalization feature, having integer literals used in
sql like 1, or 2 could create some confusion on whether those are
placeholders or constant values, thus this commit updates the
pgsm_query_id regression test to use different integer literals to avoid
confusion.

* Improve query denormalization regression test

Add a new test case:

1. Execute a prepared statement with larger execution time first.
2. Execute the same prepared statement with cheap execution time.
3. Ensures that the denormalized heavy query is not replaced by the
   cheaper.

* Format source using pgindent

* Fix top query regression tests on PG 12,13

On PG 12, 13, the internal return instruction in the following function:
```
CREATE OR REPLACE FUNCTION add(int, int) RETURNS INTEGER AS
  $$
  BEGIN
     return (select $1 + $2);
  END; $$ language plpgsql;
```

Is stored as SELECT (select expr1 + expr2)

On PG 14 onward it's stored just as SELECT (expr1 + expr2)
2024-11-01 19:28:16 -03:00
Artem Gavrilov 467394fb6e
Add timeouts to CI jobs (#484) 2024-08-26 12:00:58 -03:00
Artem Gavrilov bcf7bed60b
Use PG17-beta3 (#483) 2024-08-16 11:52:31 -03:00
Artem Gavrilov 0c50b23d6f
Prepare release 2.1.0 (#482)
* Update META.json

* Drop RELEASE_NOTES.md

* Update meson.build

* Remove mkdocs.yml
2024-08-08 12:17:38 +02:00
Artem Gavrilov 3bb65798fd
Format sources (#475)
* Temporary disable workflows

* Add indent target to makefiel

* Add CI workflow to check if sources formatted

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Format sources

* Add comments

* Revert "Temporary disable workflows"

This reverts commit 7e11cf6154.

* Revert "Format sources"

This reverts commit 6ef992d9f0.

* Use PG17 for code formatt

* Format sources

* Revert "Format sources"

This reverts commit 34061e1f82.

* Format sources
2024-08-07 15:12:24 +02:00
Zsolt Parragi 130d6b5fce
PG-592: Treat queries with different parent queries as separate entries (#403)
* PG-592: Treat queries with different parent queries as separate entries

1. Previously pg_stat_monitor had a `topquery` and `topqueryid` field, but it was only a sample:
it showed one of the top queries executing the specific query.

With this change, the same entry executed by two different functions will result in two entries in the statistics table.

2. This also fixes a bug where the content of these field disappeared for every second query executed:
previously the update function changed topqueryid to `0` if it was non zero, and changed it to the proper id when it was 0.
This resulted in an alternating behavior, where for every second executed query the top query disappeared.

After these changes, the top query is always shown.

3. The previous implementation also leaked dsa memory used to store the parent queries. This is now also fixed.

* PG-502: Fixing review comments

* dsa_free changed to assert as it can never happen
* restructured the ifs to be cleaner
  Note: kept the two-level ifs, as that makes more sense with the assert
  Note: didn't convert nested_level checks to macro, as it is used differently at different parts of the code

* PG-502: Fixing review comments

* PG-592 Add regression test

* Make test compatible with PG12

* Remove redundant line

---------

Co-authored-by: Artem Gavrilov <artem.gavrilov@percona.com>
2024-08-06 23:43:48 +02:00
Artem Gavrilov 1aa3081eaf
Drop adopters list (#480) 2024-08-01 09:12:20 -03:00
Artem Gavrilov 7680ceafd6
Drop CI workflows for PG11 (#479) 2024-08-01 09:23:26 +02:00
Muhammad Aqeel 778043a5db
[PKG-144]: Fixes issue in command to get clang version. (#478) 2024-07-25 14:02:19 +05:00
Artem Gavrilov d7999f1acf
[PG-644] Add option to disable application name tracking (#469)
* Cache application name for every backed instance

* Improve pg_get_backend_status performance for PG16 and PG17

* Fix

* Make application_name tracking disabled by default

* Meke app name tracking opt-out

* Format newly added code with pgindent

* Fix build for PG17

* Fix
2024-07-23 18:49:33 +02:00
Muhammad Aqeel 16ec8362e2
[PKG-140]: Updates build scripts to build pg_stat_monitor with LLVM 1… (#476)
[PKG-140]: Updates build scripts to build pg_stat_monitor with LLVM 17.0.
2024-07-23 14:53:07 +05:00
Artem Gavrilov dacb41f9e4
[PG-810] PG-17 Support (#463)
* Temporary disable all workflows

* Add build workflow with PG17

* Fix incompatibilities

* Fix 007_settings_pgsm_query_shared_buffer.pl test

* Fix 018_column_names.pl

* Fix 025_compare_pgss.pl

* Remove tuplestore_donestoring usage at all

* Rename I/O timing statistics columns to shared_blk_{read|write}_time

* Fix comments with fileds numbers

* Fix format

* Revert "Temporary disable all workflows"

This reverts commit 12e75beb63.

* Disable all workflows except check and build for PG 15, 16 and 17

* Fix

* Fix comments

* Fix migration

* Use REL_17_BETA1 in CI

* Add timers tests to 028_temp_block.pl

* Add local blocks timing statistics columns local_blk_{write|read}_time

* Fix t/027_local_blocks.pl test for older PG versions

* Fix

* Add jit_deform_{count|time} metrics

* Fix

* Add stats_since and minmax_stats_since fields

* Revert "Disable all workflows except check and build for PG 15, 16 and 17"

This reverts commit 73febf3aee.

* Fix t/028_temp_block.pl for PG14 and below

* Fix build for PG12

* Add pgdg workflow for PG17

* Try to fix PG pgdg workflow

* Fixes and formatting

* Format code

* Add level tracking regression test

* Fix nesting level tracking

* Format code

* Add level tracking test expected result for PG13

* Fix for PG12

* Skip level tracking regression test for PG version less than 14

* Fix toplevel calculation for older PG version

* Fix level tracking test results

* Fix nesting level counting for older PG version

* Revert "Fix nesting level counting for older PG version"

This reverts commit 3e91da8010.

* Fix level tracking for older PG versions once again

* Set REL_17_BETA2 tag for PG

* Add CI badge for PG17

* Use PG17 for examples in readme
2024-07-18 14:59:57 +02:00
Artem Gavrilov c796995e0c
Add instructions for Trunk, add PGXN badge (#473) 2024-07-12 18:23:38 +03:00
Artem Gavrilov fdec44af94
Add CODEOWNERS file (#472)
Add codeowners file
2024-07-12 13:46:44 +02:00
Artem Gavrilov 0db7f70028
PGXN integration complete (#471)
* Fix and debug

* Temorary disable all workflows

* Try invalid version tag

* Enable upload step

* Remove pull request trigger

* Revert "Temorary disable all workflows"

This reverts commit 757e04ba58.
2024-07-12 13:46:25 +02:00