Skip to content

Commit 3fbf707

Browse files
committed
Added minimal test for pg_wait_sampling
1 parent aa4e0a9 commit 3fbf707

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ OBJS = pg_wait_sampling.o collector.o
66
EXTENSION = pg_wait_sampling
77
DATA = pg_wait_sampling--1.0.sql
88

9+
REGRESS = load
10+
11+
EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/conf.add
12+
913
ifdef USE_PGXS
1014
PG_CONFIG = pg_config
1115
PGXS := $(shell $(PG_CONFIG) --pgxs)

conf.add

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shared_preload_libraries = 'pg_wait_sampling'

expected/load.out

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CREATE EXTENSION pg_wait_sampling;
2+
\d pg_wait_sampling_current
3+
View "public.pg_wait_sampling_current"
4+
Column | Type | Modifiers
5+
------------+---------+-----------
6+
pid | integer |
7+
event_type | text |
8+
event | text |
9+
10+
\d pg_wait_sampling_history
11+
View "public.pg_wait_sampling_history"
12+
Column | Type | Modifiers
13+
------------+--------------------------+-----------
14+
pid | integer |
15+
ts | timestamp with time zone |
16+
event_type | text |
17+
event | text |
18+
19+
DROP EXTENSION pg_wait_sampling;

sql/load.sql

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE EXTENSION pg_wait_sampling;
2+
3+
\d pg_wait_sampling_current
4+
5+
\d pg_wait_sampling_history
6+
7+
DROP EXTENSION pg_wait_sampling;

0 commit comments

Comments
 (0)