Navigation

Cluster configuration parameters

You can configure your PlanetScale for Postgres cluster settings in the "Parameters" tab on the Cluster configuration page for your database.

Configuring parameter values

You must be a database or organization administrator to modify these settings.

  1. From the PlanetScale organization dashboard, select the desired database
  2. Navigate to the Cluster configuration page from the menu on the left
  3. Choose the branch whose parameters you'd like to configure in the "Branch" dropdown
  4. Select the Parameters tab
  5. Search for a specific parameter or scroll through the page to see all configurable parameters
  6. Update the value for the parameter(s) you wish to adjust
  7. Click "Queue parameter changes"
  8. Once you're ready to apply the changes, click "Apply changes"

Tracking changes to parameters

You can click on the "Changes" tab on the Cluster configuration page to view a log of any changes made to your parameter settings. The log will include the settings affected, the original and updated values, status, user that made the changes, start time, and end time.

Note

When updating a cluster's size, some parameters will automatically be adjusted. Each cluster size is associated with default parameter settings, changing the cluster size will also update those defaults. The exception to this is if you manually override a default parameter setting. In that case, a cluster size adjustment will not automatically change that setting.

Restarts and maintenance windows

Some parameters require a cluster restart to take effect. If a restart is required, it is noted next to the parameter. Restarts begin as soon as you click "Apply changes".

The defaults for each parameter depend on the size of your cluster. The defaults have been chosen to optimize performance, resource usage, and connection handling for each cluster size. However, you are able to fine-tune each of these settings as needed.

Default parameter values

The following table shows the default values for parameters that are displayed by default to customers. You can find additional parameters in the search field.

ParameterDescription
PSBouncer
Number of processesSets the number of PgBouncer processes that will run on each node in this branch's cluster
default_pool_sizeSets the number of server connections to allow per user/database pair
max_client_connSets the maximum number of client connections allowed
max_prepared_statements Sets the maximum number of client-prepared statements available across server connections
server_lifetimeSets how long an unused server connection stays open (in seconds)
server_idle_timeoutSets how long an idle server connection stays open (in seconds)
Resource usage
effective_io_concurrencySets the number of simultaneous requests that can be handled efficiently by the disk subsystem
effective_cache_sizeSets planner's assumption about the total size of the data caches
huge_pagesControls whether huge pages are requested for the main shared memory area
maintenance_work_memSets the maximum memory to be used for maintenance operations
max_parallel_maintenance_workersSets the maximum number of parallel processes per maintenance operation
max_parallel_workersSets the maximum number of parallel workers that can be active at one time
max_parallel_workers_per_gatherSets the maximum number of parallel processes per executor node
max_worker_processesSets the maximum number of background processes that the cluster can support
shared_buffersSets the amount of memory the database server uses for shared memory buffers
work_memSets the amount of memory to be used by internal sort operations and hash tables before writing to temporary disk files
Write-ahead log
checkpoint_completion_targetSpecifies the target of checkpoint completion, as a fraction of total time between checkpoints
max_wal_sizeSets the maximum WAL size that triggers a checkpoint
min_wal_sizeSets the minimum WAL size that triggers a checkpoint
wal_buffersSets the number of disk-page buffers in shared memory for WAL
wal_levelSets the level of information written to the WAL
Query tuning
default_statistics_targetSets the default statistics target for table columns without a column-specific target set
random_page_costSets the planner's estimate of the cost of a nonsequentially fetched disk page
Connections and authentication
max_connectionsSets the maximum number of concurrent connections
Failover
failover_delaySets the failover delay before triggering a failover to standby replicas

Need help?

Get help from the PlanetScale Support team, or join our GitHub discussion board to see how others are using PlanetScale.