File tree Expand file tree Collapse file tree 2 files changed +54
-6
lines changed Expand file tree Collapse file tree 2 files changed +54
-6
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " pg_wait_sampling" ,
3
+ "abstract" : " Sampling based statistics of wait events" ,
4
+ "description" : " pg_wait_sampling provides functions for detailed per backend and per query statistics about PostgreSQL wait events" ,
5
+ "version" : " 1.1.0" ,
6
+ "maintainer" : [
7
+ " Alexander Korotkov <a.korotkov@postgrespro.ru>" ,
8
+ " Ildus Kurbangaliev <i.kurbangaliev@gmail.com>"
9
+ ],
10
+ "license" : {
11
+ "PostgreSQL" : " http://www.postgresql.org/about/licence"
12
+ },
13
+ "prereqs" : {
14
+ "runtime" : {
15
+ "requires" : {
16
+ "PostgreSQL" : " 9.6.0"
17
+ }
18
+ }
19
+ },
20
+ "provides" : {
21
+ "pg_wait_sampling" : {
22
+ "file" : " pg_wait_sampling--1.1.sql" ,
23
+ "docfile" : " README.md" ,
24
+ "version" : " 1.1.0" ,
25
+ "abstract" : " Sampling based statistics of wait events"
26
+ }
27
+ },
28
+ "resources" : {
29
+ "bugtracker" : {
30
+ "web" : " https://github.com/postgrespro/pg_wait_sampling/issues"
31
+ },
32
+ "repository" : {
33
+ "url" : " https://github.com/postgrespro/pg_wait_sampling.git" ,
34
+ "web" : " https://github.com/postgrespro/pg_wait_sampling" ,
35
+ "type" : " git"
36
+ }
37
+ },
38
+ "generated_by" : " Ildus Kurbangaliev" ,
39
+ "meta-spec" : {
40
+ "version" : " 1.0.0" ,
41
+ "url" : " http://pgxn.org/meta/spec.txt"
42
+ },
43
+ "tags" : [
44
+ " waits" ,
45
+ " sampling" ,
46
+ " background worker" ,
47
+ " wait events" ,
48
+ " waits history" ,
49
+ " waits profile"
50
+ ]
51
+ }
Original file line number Diff line number Diff line change @@ -38,16 +38,13 @@ register_wait_collector(void)
38
38
BackgroundWorker worker ;
39
39
40
40
/* Set up background worker parameters */
41
+ memset (& worker , 0 , sizeof (worker ));
41
42
worker .bgw_flags = BGWORKER_SHMEM_ACCESS ;
42
43
worker .bgw_start_time = BgWorkerStart_ConsistentState ;
43
44
worker .bgw_restart_time = 0 ;
44
45
worker .bgw_notify_pid = 0 ;
45
- #if PG_VERSION_NUM >= 100000 || defined(WIN32 )
46
- memcpy (worker .bgw_library_name , "pg_wait_sampling" , BGW_MAXLEN );
47
- memcpy (worker .bgw_function_name , CppAsString (collector_main ), BGW_MAXLEN );
48
- #else
49
- worker .bgw_main = collector_main ;
50
- #endif
46
+ snprintf (worker .bgw_library_name , BGW_MAXLEN , "pg_wait_sampling" );
47
+ snprintf (worker .bgw_function_name , BGW_MAXLEN , CppAsString (collector_main ));
51
48
snprintf (worker .bgw_name , BGW_MAXLEN , "pg_wait_sampling collector" );
52
49
worker .bgw_main_arg = (Datum ) 0 ;
53
50
RegisterBackgroundWorker (& worker );
You can’t perform that action at this time.
0 commit comments