Skip to content

Commit

Permalink
Merge pull request #2907 from nickanderson/human-pg-rec/master
Browse files Browse the repository at this point in the history
Improved human readability for psql recommendations
  • Loading branch information
nickanderson authored Jun 6, 2024
2 parents ff42e72 + 0119a36 commit 281e679
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cfe_internal/recommendations.cf
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,19 @@ bundle agent postgresql_conf_recommendations
reports:
psql_conf_recommendations_not_kept::
"CFEngine Recommended Settings:";
"You have less than $(lower)KB of total memory, please consider adding more memory."
if => islessthan( "$(mem_info_data[MemTotal][1])", $(lower) );
"shared_buffers = $(conf[shared_buffers])"
if => isvariable( "conf[shared_buffers]" ),
classes => results( "bundle", "cfengine_recommendation_emitted");
"effective_cache_size = $(conf[effective_cache_size])"
if => isvariable( "conf[effective_cache_size]" ),
classes => results( "bundle", "cfengine_recommendation_emitted");
"maintenance_work_mem = $(conf[maintenance_work_mem])"
"$(with)"
with => concat( "maintenance_work_mem = $(conf[maintenance_work_mem]);",
" If we have more than 2GB of memory available then",
" we set the maintenance_work_memory to 2G to improve",
" index creation, and vacuuming. Else we leave the default value." ),
if => isvariable( "conf[maintenance_work_mem]" ),
classes => results( "bundle", "cfengine_recommendation_emitted");
}

0 comments on commit 281e679

Please sign in to comment.