Commit Graph

17 Commits (cb8505a2cb4c8a4431b6daf8f7764e2ae1112d0b)

Author SHA1 Message Date
Ibrar Ahmed 363f4ab2bd
Merge pull request #175 from darkfronza/PG-338_fix_query_call_count
PG-338: Fix query call count
2022-01-24 18:45:30 +05:00
Diego Fronza 52fb1fbc7d PG-338: Fix counters regression test.
After fixing the problem with utility statements, this whole block:
do $$
declare
   n integer:= 1;
begin
	loop
		PERFORM a,b,c,d FROM t1, t2, t3, t4
			 WHERE t1.a = t2.b AND t3.c = t4.d ORDER BY a;
		exit when n = 1000;
		n := n + 1;
	end loop;
end $$;

Is only processed once, as those are nested statements, in order to
match the 1000 statements the GUC pg_stat_monitor.track must be set to
'all' and then back to the default of 'top' when done testing it.
2022-01-21 13:44:05 -03:00
Naeem Akhter 433472ef12 PG-267 Add testcase to test histogram.
This commit adds following three sql based testcases:

1) Test unique application name set by user.
2) Histogram function is working properly as desired.
3) Error on insert is shown with proper message.
2022-01-19 18:04:02 +05:00
Diego Fronza 8a94129848 PG-320: Removal of state columnns from pgsm view.
We are concerned with finished queries in pg_stat_monitor, so state and
state_code columns were removed from the pg_stat_monitor_view as we only
list finished queries on it.

Removed state regression as it is not necessary anymore.

Also, this allowed us to remove the call to pgss_store on ExecutorStart,
which just updated query state to EXEC, thus saving some CPU.
2022-01-06 12:19:05 -03:00
Diego Fronza 57839c7664 PG-295: Fix top_query regression test.
The issue is that between changing GUC "track" from track='top' to
track='all' the queries are executing using previous state of
track='top', to fix that we sleep 1 second after calling
pg_reload_conf() to ensure that queries will run with new settings.
2021-12-30 09:49:32 -03:00
Diego Fronza a702f24465 PG-293: Update regression tests (extract_comments).
guc: Add the new GUC variable to the output.

tags: Handle both cases, enable/disable extracting query comments.
2021-12-30 09:49:32 -03:00
Diego Fronza 30a328f381 PG-293: Update regression tests.
cmd_type: Added missing DROP TABLE t2;

guc: Adjusted to match the updated settings view, which now display
     boolean values as 'yes' and 'no', also added the 'options' column
     to the output.

guc_1: Handle PostgreSQL versions <= 12 which don't have the
           track_planning feature.

rows.out: Added missing DROP TABLE t2. Also removed the line 'ERROR:
          relation "t2" already exists' since we fixed the problem in
	  cmd_type regression.

top_query: Handling both track = 'top' and track = 'all' cases.

top_query_1: On PostgreSQL >= 14 the sub query from the procedure is
             stored as (select $1 + $2), whereas on PG <= 13 it is
	     stored as SELECT (select $1 + $2).
2021-12-30 09:49:30 -03:00
Ibrar Ahmed 3d3ece2f99 PG-221: Use alternate of GetUserID function in error hook. 2021-08-31 14:55:53 +00:00
Naeem Akhter 13501632b1 DISTPG-271: Fix the failing 'relations' testcase 2021-08-02 19:37:14 +05:00
Ibrar Ahmed 67b3d961ca PG-193: Comment based tags to identify different parameters. 2021-05-19 22:15:37 +05:00
Ibrar Ahmed 334389c76e PG-188: Added a new column to monitor the query state.
Added missing test case files.
2021-03-21 00:17:17 +05:00
Ibrar Ahmed f8ed33a92a PG-188: Added a new column to monitor the query state. 2021-03-21 00:04:39 +05:00
Ibrar Ahmed e0fc683810 PG-186: Add support to monitor query execution plan. 2021-03-17 18:56:39 +05:00
Ibrar Ahmed aa0ca050d5 PG-186: Add support to monitor query execution plan.
Fix a regression test case.
2021-03-12 19:09:28 +00:00
Ibrar Ahmed 066162c3f6 PG-186: Add support to monitor query execution plan.
This requires refactoring of code to add this functionality. Along with
that this patch contains regression test cases.
2021-03-12 18:55:12 +00:00
Mikhail Samoylov 15a62d9ad3 PG-184: Test version. 2021-02-23 20:43:22 +03:00
Mikhail Samoylov 2e3cba343f PG-183. Move tests to separate directory 2021-02-20 23:17:34 +03:00