Since upgrading to 2018.1.0 my PostgreSQL logs are growing rapidly, up to 2GB a day.
Error messages and logs
The logs are being filled up messages similar to the following:
2018-05-11 08:16:15.819 EDT [db:pe-puppetdb,sess:5af5880a.43bf,pid:17343,vtid:30/391,tid:65255616] STATEMENT:
with recursive live_paths(key, path, value) as (select key, key as path, value
from (select (jsonb_each(stable||volatile)).* from factsets) as base_case union all
select sub_path as key, sub_paths.path||'#~'||sub_path as path,
sub_value as value from (select * from (select path, case jsonb_typeof(value) when 'object'
then (jsonb_each(value)).key when 'array'
then generate_series(0, jsonb_array_length(value - 1))::text
end
as sub_path, case jsonb_typeof(value) when 'object' then (jsonb_each(value)).value when 'array'
then jsonb_array_elements(value)
end
as sub_value from live_paths) as candidates where candidates.sub_path is not null)
as sub_paths) delete from fact_paths fp where not exists (select 1 from live_paths
where live_paths.path = fp.path)`
Version and installation information
PE version: 2018.1.0
This issue only affects 2018.1.0. It was resolved in 2018.1.2.
Solution
Excessive temporary file logging in PosgreSQL is a known issue in PE 2018.1.0. Fix it by setting value of the log_temp_files
parameter to -1 to stop logging temporary files in either Hiera or the console, but not both.
In Heira
Set the value of the log_temp_files
parameter to -1 with the following steps.
-
Add the following to Hiera, by default in
common.yaml
:puppet_enterprise::profile::database::log_temp_files: -1
-
On the master, run
puppet agent -t
.
In the console
Set the value of the log_temp_files
parameter to -1 with the following steps.
-
In the console, click Classification, click the
+
to the left of PE Infrastructure, click PE Database, click Configuration. Click Parameter name and selectlog_temp_files
. -
Under Value, change the value to
-1
. -
Click Add parameter and Commit changes.
Comments
0 comments
Please sign in to leave a comment.