Commit Graph

361 Commits (6f353a5596e62b1afff58f783281cd3d2d6ab49e)

Author SHA1 Message Date
Diego Fronza 6f353a5596 PG-228: Add severity to the internal message logging API.
Add support to include the severity of messages added to the
pg_stat_monitor_errors view.
2021-12-30 09:46:15 -03:00
Diego Fronza c37713b9d5 PG-228: Add new view, pg_stat_monitor_errors.
The pg_stat_monitor_errors view was created in order to help inspecting
internal errors that may occur in pg_stat_monitor module itself, it
contains the error message, its severity, the last time the error occurred
and the number of times that any given error ocurred.

Implementation details:
 - A new lwlock was added to the pgssSharedState structure in order to
   control access to the errors hash table.
 - Increased RequestNamedLWLockTranche() no. of locks requested to 2.
 - The function GetNamedLWLockTranche() returns an array of locks, we
   use the first lock for controlling access to the usual buckets hash
   table, and the second one to control access to the errors hash table.
 - During module initialization (_PG_init) we increased the amount of
   shared memory space requested to include space to the new errors hash
   table: RequestAddinShmemSpace(... + pgsm_errors_size())
 - The implementation in pgsm_errors.c simple uses a hash table to track
   error messages, the message is also used as the key.
2021-12-30 09:46:12 -03:00
Ibrar Ahmed 10f305b4b1
Merge pull request #156 from umairshahid/patch-1
Update README.md
2021-12-28 20:53:19 +05:00
Umair Shahid 150df586ee
Update README.md
Proposed changes for https://jira.percona.com/browse/PG-155
2021-12-28 17:58:36 +04:00
Ibrar Ahmed 91073aad78
Merge pull request #150 from darkfronza/PG-290_fix_crash_higher_debug_level_master
PG-290: Fix crash when enabling debugging log level on PostgreSQL.
2021-12-07 15:17:39 -05:00
Diego Fronza 3433c77d9d PG-290: Fix crash when enabling debugging log level on PostgreSQL.
There were couple issues to handle, the main one was that our log hook
(pgsm_emit_log_hook) was being called after the shared memory hook
completed (pgss_shmem_startup) but before PostgreSQL boostraping code
finished, thus triggering the following assertion during a call to
LWLockAcquire():
Assert(!(proc == NULL && IsUnderPostmaster));

proc is a pointer to MyProc, a PostgreSQL's shared global variable that
was not yet initalized by PostgreSQL.

We must also check for a NULL pointer return in pg_get_backend_status()
the pgstat_fetch_stat_local_beentry() function may return a NULL pointer
during initialization, in which case we use "127.0.0.1" for the client
address, and "postmaster" for application name.
2021-12-06 15:39:34 -03:00
EvgeniyPatlan fb7220cdf1
Merge pull request #149 from percona/fix_packaging
Fix rpm packaging
2021-12-06 16:34:15 +02:00
Evgeniy Patlan 5d526fbbd4 Fix rpm packaging 2021-12-06 14:43:51 +02:00
Oleksandr Miroshnychenko d05f6d8e3b
Merge pull request #143 from vorsel/1.0.0-2
DISTPG-7 update debian rules for 1.0.0-rc.1 version
2021-11-29 10:51:54 +02:00
Oleksandr Miroshnychenko 3b155bd643 DISTPG-7 fir debian rules for 1.0.0-rc.1 version 2021-11-26 16:47:00 +02:00
Ibrar Ahmed 8fe7676923 PG-284: Bump version to 1.0.0-rc.1. 2021-11-24 18:55:13 +00:00
Ibrar Ahmed 269c8bc62c
Merge pull request #142 from nastena1606/PG-285-Doc-order-of-extensions
PG-285 Doc: Order of modules
2021-11-24 16:52:31 +05:00
Anastasia Alexadrova f7275071cd PG-285 Doc: Order of modules
Added a note about strict order of modules for PG 13 and earlier versions

modified:   README.md
2021-11-24 12:47:06 +02:00
Ibrar Ahmed a1e9526b51
Merge pull request #141 from darkfronza/PG-234_fix_load_of_pgsm_and_pgss
PG-234: Fix loading both pg_stat_monitor and pg_stat_statements.
2021-11-24 13:32:49 +05:00
Diego Fronza 47e84f96c3 PG-234: Fix loading both pg_stat_monitor and pg_stat_statements.
If both modules are loaded then pg_stat_monitor detects that and avoid
calling standard_ProcessUtility() in ProcessUtility_hook hook, as
calling it twice is an error and triggers an assertion on PostgreSQL.

On PostgreSQL 13, pg_stat_monitor must be loaded after
pg_stat_statements, as pg_stat_statements doesn't do such verifications,
it end calling standard_ProcessUtility() and other functions even if
another module is registered, that is an error.

They fixed this problem with pg_stat_statements in PostgreSQL 14 and onward.
2021-11-22 15:13:30 -03:00
Ibrar Ahmed 96fde5931c
Merge pull request #140 from nastena1606/PG-210-Doc-Update-column-names-for-PG14-master
PG-210 Doc: Updated column names depending on PG version
2021-11-17 16:58:00 +05:00
Anastasia Alexadrova bb7fd54b74 PG-210 Doc: Updated column names depending on PG version
added a footenote about toplevel being available starting from PG14 only

modified:   docs/COMPARISON.md
	modified:   docs/REFERENCE.md
2021-11-17 13:27:56 +02:00
Ibrar Ahmed ac2aaec72f
Merge pull request #139 from EvgeniyPatlan/master
DISTPG-307: update pg_stat_stat_monitor
2021-11-17 11:28:23 +05:00
Evgeniy Patlan 892a117487 DISTPG-307 update pg_stat_stat_monitor 2021-11-17 07:52:52 +02:00
Ibrar Ahmed 6cf798416e
Update README.md 2021-11-17 01:42:55 +05:00
Ibrar Ahmed 973cb16d34
Update README.md 2021-11-17 01:42:10 +05:00
Ibrar Ahmed 0248c1fe5e Rename workflows. 2021-11-16 20:41:04 +00:00
Ibrar Ahmed ff7d82be6e
Update README.md 2021-11-17 01:38:24 +05:00
Ibrar Ahmed a0c848749c
Update README.md 2021-11-17 01:36:38 +05:00
Ibrar Ahmed 88523792f5 Rename workflows. 2021-11-16 20:30:34 +00:00
Ibrar Ahmed 5e2b107471
Update README.md 2021-11-17 01:20:08 +05:00
Ibrar Ahmed b5cbd98ae8
Update and rename pg11test.yml to postgresql-11-build.yml 2021-11-17 01:19:32 +05:00
Ibrar Ahmed 5d06977110
Merge pull request #138 from darkfronza/PG-277_fix_regression_pgsm_overflow_target_defaults
PG-277: Fix regression tests (pgsm_overflow_target defaults).
2021-11-17 01:13:42 +05:00
Diego Fronza c577750538 PG-277: Fix regression tests (pgsm_overflow_target defaults).
Adjust guc_1.out to match guc.out defaults for pgsm_overflow_target.
2021-11-16 16:31:44 -03:00
Ibrar Ahmed d3725790d4 Regression Fix. 2021-11-16 12:01:46 +00:00
Ibrar Ahmed 74dd7c80d8 Regression Fix. 2021-11-16 11:46:15 +00:00
Ibrar Ahmed c8d7209149 PG-273: pg_stat_monitor_hook_stats disable to end user. 2021-11-16 11:38:21 +00:00
Ibrar Ahmed 680c7fda42 PG-210: Add new column toplevel. 2021-11-16 11:23:59 +00:00
Ibrar Ahmed 5f6177daa3 PG-210: Add new column toplevel. 2021-11-16 10:48:11 +00:00
Ibrar Ahmed 6ea5a8991c
Merge pull request #135 from percona/devel
Devel
2021-11-14 20:15:30 +05:00
Ibrar Ahmed 351f4e4644
Merge pull request #134 from darkfronza/PG-276_fix_regression_tests
PG-276: Fix regression tests.
2021-11-14 20:15:10 +05:00
Diego Fronza 0a45fc740f PG-276: Fix regression tests.
The guc_1.out is used for PG >= 13, where query track planning is
available, so it has been restored.
2021-11-12 16:55:51 -03:00
Ibrar Ahmed 192ec4e470
Merge pull request #133 from percona/devel
Devel
2021-11-13 00:37:52 +05:00
Ibrar Ahmed 85b7cabf50
Merge pull request #132 from darkfronza/PG-275_fix_regression_tests
PG-275: Fix regression tests.
2021-11-13 00:37:29 +05:00
Diego Fronza 3be31d67e9 PG-275: Fix regression tests.
Removal of redundant file guc_1.out.

Adjusted guc.out to match query planning disabled by default.
2021-11-12 14:42:17 -03:00
Ibrar Ahmed f1166c306a
Merge pull request #130 from darkfronza/PG-272_fix_server_crash
PG-272: Fix server crash when calling pg_stat_monitor_reset().
2021-11-12 20:42:29 +05:00
Ibrar Ahmed 0148409b33
Merge pull request #131 from percona/devel
Devel
2021-11-12 20:41:37 +05:00
Ibrar Ahmed 22fab87dec
Merge pull request #129 from darkfronza/PG-220_fix_pgsm_overflow_target
PG-220: fix pgsm overflow target
2021-11-12 20:40:33 +05:00
Diego Fronza 997639c067 PG-272: Fix server crash when calling pg_stat_monitor_reset().
The loop that resets the query buffers was incorrecly using MAX_BUCKETS
to indicate the number of buckets to clear, which defaults to 10. If a
user lowers this value the loop would access a pointer beyond the number
of query buffers allocated.

Fix the problem by using the correct PGSM_MAX_BUCKETS GUC as the limit
to the loop.
2021-11-12 10:58:56 -03:00
Ibrar Ahmed 3f937e30de
Merge pull request #128 from nastena1606/PG-215-Doc-Fix-links-master
PG-215: Doc Fixed links to usage examples,
2021-11-12 16:30:17 +05:00
Anastasia Alexadrova 18f357284a PG-215 Doc Fixed links to usage examples,
reaorded usage examples to align with feature order
modified:   docs/USER_GUIDE.md
2021-11-12 12:57:08 +02:00
Ibrar Ahmed 06b5e4c5fe PG-210: Columns names should match upstream pg_stat_statements column names. 2021-11-10 19:30:32 +00:00
Ibrar Ahmed 20f3d8c047 PG-210: Columns names should match upstream pg_stat_statements column names. 2021-11-10 18:33:02 +00:00
Ibrar Ahmed 51a6d38c45
Merge pull request #125 from denisok/add_build_dep
add dependencies for build
2021-11-10 22:31:07 +05:00
Ibrar Ahmed c4780aba5a
Merge pull request #124 from nastena1606/PG-215-Doc-User-guide-updates-master
PG-215 User Guide updates
2021-11-10 22:27:55 +05:00