@@ -107,13 +107,13 @@ all processes including background workers.
107
107
| queryid | int8 | Id of query |
108
108
| role_id | int4 | Id of role |
109
109
| 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 |
111
111
| backend_type | text | Name of backend type |
112
112
| 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 |
115
115
| client_hostname | text | Client hostname |
116
- | appname | text | Application name |
116
+ | application_name | text | Application name |
117
117
118
118
` pg_wait_sampling_get_current(pid int4) ` returns the same table for single given
119
119
process.
@@ -129,13 +129,13 @@ in-memory ring buffer.
129
129
| queryid | int8 | Id of query |
130
130
| role_id | int4 | Id of role |
131
131
| 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 |
133
133
| backend_type | text | Name of backend type |
134
134
| 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 |
137
137
| client_hostname | text | Client hostname |
138
- | appname | text | Application name |
138
+ | application_name | text | Application name |
139
139
| ts | timestamptz | Sample timestamp |
140
140
141
141
` pg_wait_sampling_reset_history() ` function resets the history.
@@ -151,30 +151,30 @@ in-memory hash table.
151
151
| queryid | int8 | Id of query |
152
152
| role_id | int4 | Id of role |
153
153
| 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 |
155
155
| backend_type | text | Name of backend type |
156
156
| 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 |
159
159
| client_hostname | text | Client hostname |
160
- | appname | text | Application name |
160
+ | application_name | text | Application name |
161
161
| count | int8 | Count of samples |
162
162
163
163
` pg_wait_sampling_reset_profile() ` function resets the profile.
164
164
165
165
The work of wait event statistics collector worker is controlled by following
166
166
GUCs.
167
167
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 ' |
178
178
179
179
If ` pg_wait_sampling.profile_pid ` is set to false, sampling profile wouldn't be
180
180
collected in per-process manner. In this case the value of pid could would
@@ -190,17 +190,18 @@ will be NULL.
190
190
191
191
` pg_wait_sampling.history_dimenstions ` and ` pg_wait_sampling.profile_dimensions `
192
192
determine 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.
197
198
` all ` cannot be used together with any other values and must be used alone.
198
199
199
200
> [ !WARNING]
200
201
> 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
204
205
205
206
Values of these GUC variables can be changed only in config file or with ALTER SYSTEM.
206
207
Then you need to reload server's configuration (such as with ` pg_reload_conf ` function)
0 commit comments