Commit Graph

658 Commits (fe558bdcaeca7b06b5de65b2f585123bb41e6c8c)

Author SHA1 Message Date
Ibrar Ahmed ff75b23257
Merge pull request #347 from Naeem-Akhter/PG-575-Update
PG-575: Enable installcheck-world on PG 14 & 15.
2023-01-05 17:19:50 +05:00
Naeem Akhter 7e7bcb4559 PG-575: Enable installcheck-world on PG 14 & 15.
As we are using compute_query_id on pg14 onwards for PGSM and it
causes the server installcheck-world to fail (same behaviour with PGSS).
To test installcheck-world on pg14 onwards we need to disable compute_query_id
and run server installcheck-world. But for PGSM regression we will still have
compute_query_id on.
2023-01-04 18:59:10 +05:00
Ibrar Ahmed 14b357e8df
Merge pull request #346 from Naeem-Akhter/PG310
PG-310: pg_stat_monitor: Bucket is Done vs still being current/last
2023-01-04 17:24:53 +05:00
Naeem Akhter 653b3be2a0 PG-310: pg_stat_monitor: Bucket is Done vs still being current/last
Added a TAP test case to verify the behavior of the new 'bucket_done' column.
2023-01-04 14:26:36 +05:00
Ibrar Ahmed 51b5a5a8fb
Merge pull request #345 from Naeem-Akhter/PG570
PG-570: Fix counters test case.
2023-01-04 09:42:02 +05:00
Naeem Akhter 56f4735ab0 PG-570: Fix counters test case.
Updated the test case and expected outout, and also removed the unneeded output
files.
2023-01-03 18:50:53 +05:00
Ibrar Ahmed 7c989337f1
Merge pull request #344 from EngineeredVirus/main
PG-576 - Segmentation fault caused by pg_stat_monitor unique queryid creation mechanism.
2023-01-03 17:58:14 +05:00
Hamid Akhtar f170322f38 PG-576 - Segmentation fault caused by pg_stat_monitor unique
queryid creation mechanism.

Resolving the crash identified by regression and reported by Naeem.
This fix resolves the issue with incorrect query length in case of
normalized query when the query length exceeds PGSM_QUERY_MAX_LEN.

Resolving the crash identify by regression and reported by Naeem.
2023-01-03 17:55:44 +05:00
Ibrar Ahmed b60eece145
Merge pull request #341 from EngineeredVirus/main
PG-545: pg_stat_monitor: Same query text should generate same queryid
2022-12-30 04:51:46 +05:00
Hamid Akhtar 30441b6972 PG-545: pg_stat_monitor: Same query text should generate same queryid
Updating tap test case and upgrade SQL file from version 1.0 to 2.0.
2022-12-29 14:45:17 +05:00
Naeem Akhter e0cea058ed
PG-568: Add GH Workflow for PGDG-15 and PPG-15 packages. (#343) 2022-12-29 02:28:36 +05:00
Hamid Akhtar b20eda7066 PG-545: pg_stat_monitor: Same query text should generate same queryid
Regardless of the database or the user, the same query will yield the
same query ID. As part of this, a new column, 'pgsm_query_id', is added.

* pgsm_query_id:
pgsm_query_id has the same data type of int8 as the queryid column. If
the incoming SQL command includes any constants, it internally normalizes
the query to remove those constant values with placeholders. Otherwise,
it uses the query directly to generate the query hash.

Since we no longer depend on the server's parse tree mechanism, we can
generate the same hash for the same query text for all server versions.

Also, it is important to note that the hash being calculated is a database,
schema and user independent. So same query text in different databases
will generate the same hash.

This column is not part of the key; rather, for observability purposes only.

* Regression
SQL test case pgsm_query_id.sql is added to the SQL regression.
2022-12-28 14:24:19 +05:00
Ibrar Ahmed f8866272a2
Merge pull request #340 from Naeem-Akhter/PG563
PG-563: Update TAP testcases and output due to changes by DEV.
2022-12-28 10:03:05 +05:00
Naeem Akhter b154da01da PG-563: Update TAP testcases and output due to changes by DEV.
As part of this PR, also updated regression test cases that are related to
following JIRA issues as well.

PG-354	pg_stat_monitor: Remove pg_stat_monitor_settings view
Now we not using pg_stat_monitor_settings view, due to this change majority of
TAP testcase requried output changes.

PG-558: Create test case to verify the function names and count in PGSM.
Added additional output file for SQL test case.

PG-554:	Remove redundant expected output files from regression.
Removed unnecessary output files in TAP testcases where these were not needed.
2022-12-27 18:14:32 +05:00
Naeem Akhter 56001d683f
Merge pull request #324 from ibrarahmad/PG-312
PG-312: Changing the default value of Histogram GUC.
2022-12-24 22:31:39 +05:00
Naeem Akhter d03fb8f0b7
Merge branch 'main' into PG-312 2022-12-24 22:30:23 +05:00
Ibrar Ahmed 96a1d52f08
Merge pull request #339 from Naeem-Akhter/PG-354
PG-354: Update expected output file for functions test case.
2022-12-23 05:22:38 +05:00
Naeem Akhter 0656d5f22d PG-354: Update expected output file for functions testcase. 2022-12-23 01:00:13 +05:00
Ibrar Ahmed 802774a2a7
PG-488: Revert pg_stat_monitor: Overflow management. (#338)
PG-488: Revert pg_stat_monitor: Overflow management.

This patch does not work for  < PostgreSQL - 15. More work required.
2022-12-22 19:15:14 +05:00
Ibrar Ahmed 7c5ad48276
Merge pull request #334 from EngineeredVirus/main
PG-354: pg_stat_monitor: Remove pg_stat_monitor_settings view
2022-12-21 20:34:00 +05:00
Ibrar Ahmed 8dffa8cc97
Merge pull request #336 from codeforall/main
PG-488: pg_stat_monitor: Overflow management.
2022-12-21 00:42:47 +05:00
Muhammad Usama df0580b741 PG-488: pg_stat_monitor: Overflow management.
Reimplement the storage mechanism of buckets and query texts
using Dynamic shared memory. Since the dynamic shared memory
can grow into a swap area, so we get the overflow out of the box.

oreover the new design saves the query pointer inside the bucket
and eventually, the query text gets evicted with the bucket recycle.

Finally, the dynamic shared memory hash has a built-in locking
mechanism so we can revisit the whole locking in pg_stat_monitor
has potential for lots of performance improvements
2022-12-20 17:29:15 +05:00
Naeem Akhter 5a6b824737
PG-373: Update test case - Remove WAL fields for PG12 and below. (#335) 2022-12-14 12:50:29 +05:00
Hamid Akhtar 2917ae6805 PG-354: pg_stat_monitor: Remove pg_stat_monitor_settings view
Removing the view for 2.0. Updating the required SQL files to manage
the upgrade. Downgrade from 2.x to 1.x is not supported.

Also part of this fix is the SQL regression. This does not update the
tap test cases.
2022-12-13 17:05:46 +05:00
Ibrar Ahmed a6099d6a84
Merge pull request #333 from Naeem-Akhter/PG-558
PG-558: Create test case to verify the function names and count in PGSM.
2022-12-13 16:29:52 +05:00
Naeem Akhter 1037fb08a8 PG-558: Create test case to verify the function names and count in PGSM. 2022-12-12 23:11:38 +05:00
Naeem Akhter 5cd4f255d1
Merge pull request #332 from ibrarahmad/PG-373
PG-373: Remove WAL fields for PG12 and below.
2022-12-12 15:17:43 +05:00
Naeem Akhter 2838eaa94d
Merge pull request #331 from ibrarahmad/PGSM-518
PG-518: Internal Functions should NOT be visible in PGSM API.
2022-12-12 15:16:53 +05:00
Ibrar Ahmed 3076d5bf5c PG-373: Remove wal fields for PG12 and below. 2022-12-07 15:03:14 +00:00
Ibrar Ahmed 5ae0f3a0bb PG-518: Internal Functions should NOT be visible in PGSM API. 2022-12-07 14:52:45 +00:00
Muhammad Usama 913064b68d
PG-435: Adding new counters that are available in PG15 (#329)
In line with pg_stat_statments for PG15, This commit adds eight new cumulative
counters for jit operations, making it easier to diagnose how JIT is used in an
installation. And two new columns, temp_blk_read_time, and temp_blk_write_time,
respectively, show the time spent reading and writing temporary file blocks
on disk.
Moreover, The commit also contains a few indentations and API adjustments.
2022-12-07 15:40:13 +05:00
Naeem Akhter 4a254a538b PG-553: Add a testcase to verify columns names in PGSM. 2022-12-01 12:06:08 +05:00
Ibrar Ahmed 354b92b8b6 PG-312: Changing the default value of Histogram GUC. 2022-11-23 14:49:21 +00:00
Ibrar Ahmed f7860b472f
PG-310: Bucket is “Done” vs still being current/last. (#321)
A new column is added to mention that bucket is active or done. there is    
some timing based adjustment was required with that too.   

Co-authored-by: Hamid Akhtar <hamid.akhtar@percona.com>
2022-11-23 02:23:28 +05:00
Naeem Akhter b4ab2ccc84
PG-557: Update PGSM+PMM GH workflows to pick intended target branch. (#323) 2022-11-23 02:22:13 +05:00
Naeem Akhter 8e265b9bfb
PG-556: Fix expected output of test case version. (#322) 2022-11-23 02:21:33 +05:00
Naeem Akhter fe83f56ab7
PG-554: Remove redundant files and fix regression. (#319)
PG-554: Remove reduntant files and fix regression.

Removed old files with same name and add these files to fix sql regression
on PG 14 & 15.

1- regression/expected/error_1.out
2- regression/expected/error_insert_1.out
3- regression/expected/top_query_1.out
2022-11-23 02:20:43 +05:00
Muhammad Usama 2f2c40ed22
PG-555 :Infrastructure to allow multiple SQL APIs (#320)
Creating the infrastructure that'll allow using newer versions
of the loadable module with old SQL declarations.
Also updating the build version to 2.0.0-dev
2022-11-21 18:27:21 +05:00
Naeem Akhter 7f015b5a16
Merge pull request #318 from ibrarahmad/PG544
PG-544: Regression cleanup.
2022-11-17 04:52:54 +05:00
Ibrar Ahmed 1bc14fb759 PG-544: Regression cleanup. 2022-11-16 21:31:16 +00:00
Naeem Akhter 741dea66a8
Merge pull request #317 from ibrarahmad/PG-544
PG-544: Regression cleanup.
2022-11-17 01:18:48 +05:00
Ibrar Ahmed 6643854c47
Merge branch 'percona:main' into PG-544 2022-11-17 01:08:13 +05:00
Naeem Akhter fcb6dac321
Merge pull request #316 from ibrarahmad/PG320
PG-320: Removing the query state code from the view.
2022-11-17 00:56:16 +05:00
Ibrar Ahmed a3830624bb PG-544: Regression cleanup. 2022-11-16 19:47:07 +00:00
Ibrar Ahmed 710103cd0d PG-320: Removing the query state code from the view. 2022-11-16 19:37:15 +00:00
Naeem Akhter 7f743b142a
Merge pull request #315 from ibrarahmad/PG-306
PG-306: The bucket start time should be timestamp instead of TEXT.
2022-11-16 00:44:20 +05:00
Naeem Akhter 2f62ee695b
Merge pull request #314 from ibrarahmad/PG-518
PG-518: Drop the internal function permission from PUBLIC.
2022-11-16 00:44:06 +05:00
Naeem Akhter 4f281a8c12
Merge pull request #313 from ibrarahmad/PG-552
PG-552: Remove unnecessary columns from PostgreSQL 11 and 12 views.
2022-11-16 00:43:50 +05:00
Naeem Akhter bcb1a3b1b8
Merge pull request #312 from ibrarahmad/PG-320
PG-320: Removing the query state code from the view.
2022-11-16 00:43:16 +05:00
Ibrar Ahmed bc19c99c0b PG-306: The bucket start time should be timestamp instead of TEXT. 2022-11-15 18:11:10 +00:00