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
The check_wal_files function returns some errors when using the wal_files service. It also returns a wrong number of wal file on one of our low activity standby:
$ ~/bin/check_pgactivity --service wal_filesUse of uninitialized value in string gt at ./bin/check_pgactivity line 8790.Use of uninitialized value $first_seg in string gt at ./bin/check_pgactivity line 8790.Use of uninitialized value $seg_kept in numeric gt (>) at ./bin/check_pgactivity line 8802.Use of uninitialized value in string ne at ./bin/check_pgactivity line 8825.Use of uninitialized value $ratio in multiplication (*) at ./bin/check_pgactivity line 795.Use of uninitialized value $ratio in multiplication (*) at ./bin/check_pgactivity line 795.POSTGRES_WAL_FILES OK: 1 WAL files | total_wal=1 recycled_wal=0 tli=0 written_wal=1 kept_wal=0
DEBUG: host service:main is version 9.0.23/90023
DEBUG: Query:
SELECT s.f,
greatest(
1 + current_setting('checkpoint_segments')::float4 *
(2 + current_setting('checkpoint_completion_target')::float4),
1 + current_setting('wal_keep_segments')::float4 +
2 * current_setting('checkpoint_segments')::float4
),
CASE WHEN pg_is_in_recovery()
THEN NULL
ELSE pg_current_xlog_location()
END,
current_setting('wal_keep_segments')::integer,
substring(s.f from 1 for 8) AS tli
FROM pg_ls_dir('pg_xlog') AS s(f)
WHERE f ~ '^[0-9A-F]{24}$'
ORDER BY
(pg_stat_file('pg_xlog/'||s.f)).modification DESC,
f DESC
DEBUG: Env. service: main
DEBUG: Query rc: 0
DEBUG: Query result: $VAR1 = [];
The check_wal_files function returns some errors when using the wal_files service. It also returns a wrong number of wal file on one of our low activity standby:
I think it's because the following query return an empty resultset :
dprinting the rs var on line https://github.com/OPMDG/check_pgactivity/blob/master/check_pgactivity#L8946 shows this :
So in think that's why we iterate (at least once) throught this empty array on L8951 and get the result
1 WAL files | total_wal=1
The text was updated successfully, but these errors were encountered: