File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ func observeSummary() func(*cli.Context) error {
245
245
}
246
246
247
247
if err := obs .CheckPerformanceRequirements (); err != nil {
248
+ log .Err ("Performance check error:" , err )
248
249
// Exit with error status without printing additional error logs.
249
250
os .Exit (errorExitStatus )
250
251
}
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ func (obs *Observer) PrintSummary() error {
184
184
185
185
// CheckPerformanceRequirements checks monitoring data and returns an error if any of performance requires was not satisfied.
186
186
func (obs * Observer ) CheckPerformanceRequirements () error {
187
- if obs .CheckDuration () || obs .CheckLocks () {
187
+ if ! obs .CheckDuration () || ! obs .CheckLocks () {
188
188
return errors .New ("performance requirements not satisfied" )
189
189
}
190
190
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ const queryLocks = `with lock_data as (
30
30
clock_timestamp() - a.state_change as state_changed_ago,
31
31
a.pid
32
32
from pg_stat_activity a
33
- join pg_locks l ON l.pid = a.pid
34
- where l.mode ~* 'exclusive '
33
+ join pg_locks l on l.pid = a.pid
34
+ where l.mode = 'AccessExclusiveLock' and l.locktype = 'relation '
35
35
)
36
36
select row_to_json(lock_data)
37
37
from lock_data
You can’t perform that action at this time.
0 commit comments