1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
CREATE EXTENSION pg_wait_sampling;
WITH t as (SELECT sum(0) FROM pg_wait_sampling_current)
SELECT sum(0) FROM generate_series(1, 2), t;
sum
-----
0
(1 row)
WITH t as (SELECT sum(0) FROM pg_wait_sampling_history)
SELECT sum(0) FROM generate_series(1, 2), t;
sum
-----
0
(1 row)
WITH t as (SELECT sum(0) FROM pg_wait_sampling_profile)
SELECT sum(0) FROM generate_series(1, 2), t;
sum
-----
0
(1 row)
-- Some dummy checks just to be sure that all our functions work and return something.
SELECT count(*) = 1 as test FROM pg_wait_sampling_get_current(pg_backend_pid());
test
------
t
(1 row)
SELECT count(*) >= 0 as test FROM pg_wait_sampling_get_profile();
test
------
t
(1 row)
SELECT count(*) >= 0 as test FROM pg_wait_sampling_get_history();
test
------
t
(1 row)
SELECT pg_wait_sampling_reset_profile();
pg_wait_sampling_reset_profile
--------------------------------
(1 row)
DROP EXTENSION pg_wait_sampling;
|