@@ -107,13 +107,13 @@ all processes including background workers.
107107| queryid| int8| Id of query|
108108| role_id| int4| Id of role|
109109| database_id| int4| Id of database|
110- | parallel_leader_pid | int4| Id of parallel query leader|
110+ | leader_pid | int4| Id of parallel query leader|
111111| backend_type| text| Name of backend type|
112112| backend_state| text| Name of backend state|
113- | proc_start | timestamptz| Timestamp of process start|
114- | client_addr| text | Client address|
113+ | backend_start | timestamptz| Timestamp of process start|
114+ | client_addr| inet | Client address|
115115| client_hostname| text| Client hostname|
116- | appname | text| Application name|
116+ | application_name | text| Application name|
117117
118118` pg_wait_sampling_get_current(pid int4) ` returns the same table for single given
119119process.
@@ -129,13 +129,13 @@ in-memory ring buffer.
129129| queryid| int8| Id of query|
130130| role_id| int4| Id of role|
131131| database_id| int4| Id of database|
132- | parallel_leader_pid | int4| Id of parallel query leader|
132+ | leader_pid | int4| Id of parallel query leader|
133133| backend_type| text| Name of backend type|
134134| backend_state| text| Name of backend state|
135- | proc_start | timestamptz| Timestamp of process start|
136- | client_addr| text | Client address|
135+ | backend_start | timestamptz| Timestamp of process start|
136+ | client_addr| inet | Client address|
137137| client_hostname| text| Client hostname|
138- | appname | text| Application name|
138+ | application_name | text| Application name|
139139| ts| timestamptz| Sample timestamp|
140140
141141` pg_wait_sampling_reset_history() ` function resets the history.
@@ -151,30 +151,30 @@ in-memory hash table.
151151| queryid| int8| Id of query|
152152| role_id| int4| Id of role|
153153| database_id| int4| Id of database|
154- | parallel_leader_pid | int4| Id of parallel query leader|
154+ | leader_pid | int4| Id of parallel query leader|
155155| backend_type| text| Name of backend type|
156156| backend_state| text| Name of backend state|
157- | proc_start | timestamptz| Timestamp of process start|
158- | client_addr| text | Client address|
157+ | backend_start | timestamptz| Timestamp of process start|
158+ | client_addr| inet | Client address|
159159| client_hostname| text| Client hostname|
160- | appname | text| Application name|
160+ | application_name | text| Application name|
161161| count| int8| Count of samples|
162162
163163` pg_wait_sampling_reset_profile() ` function resets the profile.
164164
165165The work of wait event statistics collector worker is controlled by following
166166GUCs.
167167
168- | Parameter name| Data type| Description| Default value|
169- | -------------------------------------| ---------| ---------------------------------------------| ---------------------------------------------- |
170- | pg_wait_sampling.history_size| int4| Size of history in-memory ring buffer| 5000|
171- | pg_wait_sampling.history_period| int4| Period for history sampling in milliseconds| 10|
172- | pg_wait_sampling.profile_period| int4| Period for profile sampling in milliseconds| 10|
173- | pg_wait_sampling.profile_pid| bool| Whether profile should be per pid| true|
174- | pg_wait_sampling.profile_queries| enum| Whether profile should be per query| top|
175- | pg_wait_sampling.sample_cpu| bool| Whether on CPU backends should be sampled| true|
176- | pg_wait_sampling.history_dimensions| text| Additional columns in extended history view| 'pid,wait_event_type, wait_event, query_id '|
177- | pg_wait_sampling.profile_dimensions| text| Additional columns in extended profile view| 'pid,wait_event_type, wait_event, query_id '|
168+ | Parameter name| Data type| Description| Default value|
169+ | -------------------------------------| ---------| ---------------------------------------------| -----------------------|
170+ | pg_wait_sampling.history_size| int4| Size of history in-memory ring buffer| 5000|
171+ | pg_wait_sampling.history_period| int4| Period for history sampling in milliseconds| 10|
172+ | pg_wait_sampling.profile_period| int4| Period for profile sampling in milliseconds| 10|
173+ | pg_wait_sampling.profile_pid| bool| Whether profile should be per pid| true|
174+ | pg_wait_sampling.profile_queries| enum| Whether profile should be per query| top|
175+ | pg_wait_sampling.sample_cpu| bool| Whether on CPU backends should be sampled| true|
176+ | pg_wait_sampling.history_dimensions| text| Additional columns in extended history view| 'pid,event, queryid '|
177+ | pg_wait_sampling.profile_dimensions| text| Additional columns in extended profile view| 'pid,event, queryid '|
178178
179179If` pg_wait_sampling.profile_pid ` is set to false, sampling profile wouldn't be
180180collected in per-process manner. In this case the value of pid could would
@@ -190,17 +190,18 @@ will be NULL.
190190
191191` pg_wait_sampling.history_dimenstions ` and` pg_wait_sampling.profile_dimensions `
192192determine what additional columns will be sampled in` history/profile_extended `
193- views. Possible values are` all ` ,` pid ` ,` wait_event_type ` ,` wait_event ` ,
194- ` query_id ` ,` role_id ` ,` database_id ` ,` parallel_leader_pid ` ,` backend_type ` ,
195- ` backend_state ` ,` backend_start_time ` ,` client_addr ` ,` client_hostname ` ,
196- ` appname ` and any combination of column names.
193+ views. Possible values are` all ` ,` pid ` ,` event ` ,` query_id ` ,` role_id ` ,
194+ ` database_id ` ,` leader_pid ` ,` backend_type ` ,` backend_state ` ,` backend_start ` ,
195+ ` client_addr ` ,` client_hostname ` ,` application_name `
196+ and any combination of column names.
197+ ` event ` turns on and off both event and event_type columns.
197198` all ` cannot be used together with any other values and must be used alone.
198199
199200> [ !WARNING]
200201> Turning on any of the following columns:` backend_type ` ,` backend_state ` ,
201- > ` backend_start_time ` ,` client_addr ` ,` client_hostname ` ,` appname ` will reduce
202- > performance compared to sampling none of those due to the need to look into
203- > BackendStatusTable. This is especially noticeable with PostgreSQL 13-16
202+ > ` backend_start ` ,` client_addr ` ,` client_hostname ` ,` application_name ` will
203+ > reduce performance compared to sampling none of those due to the need to look
204+ > into BackendStatusTable. This is especially noticeable with PostgreSQL 13-16
204205
205206Values of these GUC variables can be changed only in config file or with ALTER SYSTEM.
206207Then you need to reload server's configuration (such as with` pg_reload_conf ` function)