From b8ac5d55200717dcb303ca03aa2b5663e997d8e1 Mon Sep 17 00:00:00 2001 From: Diego Date: Tue, 12 Sep 2023 08:43:42 -0300 Subject: [PATCH] added percent simbol in like for history files --- sql/WAL/distance_wals_from_dir.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/WAL/distance_wals_from_dir.sql b/sql/WAL/distance_wals_from_dir.sql index c9ba827..ecd8ac1 100644 --- a/sql/WAL/distance_wals_from_dir.sql +++ b/sql/WAL/distance_wals_from_dir.sql @@ -2,7 +2,7 @@ with oldest_mod_walfile as ( select (substring(name from 9 for 8) || '/' || substring(name from 17 for 8 ))::pg_lsn as oldest_lsn from pg_ls_waldir() - where name not ilike 'history' /* Skip .history files */ + where name not ilike '%history%' /* Skip .history files */ order by modification desc limit 1 ) select pg_size_pretty(pg_wal_lsn_diff( pg_current_wal_lsn(),oldest_lsn))