Skip to content
Install

Change Postgres parameters

Orchard sets Postgres defaults for you and sizes shared_buffers from the memory limit of the database. When a workload needs something different, such as a longer statement timeout or more connections, you can change a set of parameters yourself. Some parameters restart the database when you save them.

  • Edit access to the project: the Admin or Member project role.
  • A dedicated database.
  1. Open the database.
  2. Go to Settings > Parameters.
  3. Update the values.
  4. Select Save. If the change requires a restart, the page shows Saving restarts the database next to the button.
Dashboard labelParameterDefaultRange or valuesRestart
Max connectionsmax_connections10010 to 500Yes
Shared buffersshared_buffersAutomaticMemory value in kB, MB, or GBYes
Work memorywork_mem4MBMemory value in kB, MB, or GBNo
Maintenance work memorymaintenance_work_mem64MBMemory value in kB, MB, or GBNo
Effective cache sizeeffective_cache_size4GBMemory value in kB, MB, or GBNo
Slow query log (ms)log_min_duration_statement-1-1 to 600000. -1 turns this off.No
Statement timeout (ms)statement_timeout00 to 3600000. 0 turns this off.No
Idle-in-transaction timeout (ms)idle_in_transaction_session_timeout00 to 3600000. 0 turns this off.No
Synchronous commitsynchronous_commitonon, off, local, remote_write, remote_applyNo

By default, Orchard sizes shared_buffers from the database’s memory limit. When you change the memory limit, Orchard recalculates the value.

If you enter a value, Orchard uses that value exactly. If the value is large for the current memory limit, the page shows a warning. To return to automatic sizing, clear the field.

If a running value differs from the saved value, the parameter row shows the running value and the text changed outside Orchard.