Skip to content

Commit

Permalink
Merge pull request #561 from dxw/add-maintenance-work-mem-setting-for…
Browse files Browse the repository at this point in the history
…-postgres

Add 'maintenance_work_mem' setting for Postgres
  • Loading branch information
edavey authored Dec 9, 2019
2 parents 4ae9bf0 + dff7e08 commit 90e6987
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CF/manifest-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ applications:
env:
RAILS_ENV: production
RAILS_MAX_THREADS: 5
PG_MAINTENANCE_WORK_MEM: '1GB'
SUBMIT_INVOICES: 'true'
NEW_INGEST: 'true'
1 change: 1 addition & 0 deletions CF/sidekiq-manifest-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ applications:
env:
RAILS_ENV: production
RAILS_MAX_THREADS: SIDEKIQ_CONCURRENCY
PG_MAINTENANCE_WORK_MEM: '1GB'
SUBMIT_INVOICES: 'true'
NEW_INGEST: 'true'
MALLOC_ARENA_MAX: 2
Expand Down
1 change: 1 addition & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ default: &default
pool: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %>
variables:
work_mem: <%= ENV.fetch('PG_WORK_MEM') { '16MB' } %>
maintenance_work_mem: <%= ENV.fetch('PG_MAINTENANCE_WORK_MEM') { '128MB' } %>

development:
<<: *default
Expand Down

0 comments on commit 90e6987

Please sign in to comment.