You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Use boot_val for is_default check on lock_timeout
When pgwatch sets lock_timeout during collection, source becomes
'session', causing is_default to incorrectly report non-default.
Now we compare reset_val with boot_val to determine the true default
status for lock_timeout.
Copy file name to clipboardExpand all lines: config/pgwatch-prometheus/metrics.yml
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -377,7 +377,8 @@ metrics:
377
377
category as tag_category,
378
378
vartype as tag_vartype,
379
379
case when (case when name = 'lock_timeout' then reset_val else setting end) ~ '^-?[0-9]+$' then (case when name = 'lock_timeout' then reset_val else setting end)::bigint else null end as numeric_value,
380
-
case when source <> 'default' then 0 else 1 end as is_default,
380
+
-- For lock_timeout, compare reset_val with boot_val since source becomes 'session' during collection
381
+
case when name = 'lock_timeout' then (case when reset_val = boot_val then 1 else 0 end) else (case when source <> 'default' then 0 else 1 end) end as is_default,
0 commit comments