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.
- From the PlanetScale organization dashboard, select the desired database
- Navigate to the Cluster configuration page from the menu on the left
- Choose the branch whose parameters you'd like to configure in the "Branch" dropdown
- Select the Parameters tab
- Search for a specific parameter or scroll through the page to see all configurable parameters
- Update the value for the parameter(s) you wish to adjust
- Click "Queue parameter changes"
- 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.
Parameter | Description |
---|---|
PSBouncer | |
Number of processes | Sets the number of PgBouncer processes that will run on each node in this branch's cluster |
default_pool_size | Sets the number of server connections to allow per user/database pair |
max_client_conn | Sets the maximum number of client connections allowed |
max_prepared_statements Sets the maximum number of client-prepared statements available across server connections | |
server_lifetime | Sets how long an unused server connection stays open (in seconds) |
server_idle_timeout | Sets how long an idle server connection stays open (in seconds) |
Resource usage | |
effective_io_concurrency | Sets the number of simultaneous requests that can be handled efficiently by the disk subsystem |
effective_cache_size | Sets planner's assumption about the total size of the data caches |
huge_pages | Controls whether huge pages are requested for the main shared memory area |
maintenance_work_mem | Sets the maximum memory to be used for maintenance operations |
max_parallel_maintenance_workers | Sets the maximum number of parallel processes per maintenance operation |
max_parallel_workers | Sets the maximum number of parallel workers that can be active at one time |
max_parallel_workers_per_gather | Sets the maximum number of parallel processes per executor node |
max_worker_processes | Sets the maximum number of background processes that the cluster can support |
shared_buffers | Sets the amount of memory the database server uses for shared memory buffers |
work_mem | Sets 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_target | Specifies the target of checkpoint completion, as a fraction of total time between checkpoints |
max_wal_size | Sets the maximum WAL size that triggers a checkpoint |
min_wal_size | Sets the minimum WAL size that triggers a checkpoint |
wal_buffers | Sets the number of disk-page buffers in shared memory for WAL |
wal_level | Sets the level of information written to the WAL |
Query tuning | |
default_statistics_target | Sets the default statistics target for table columns without a column-specific target set |
random_page_cost | Sets the planner's estimate of the cost of a nonsequentially fetched disk page |
Connections and authentication | |
max_connections | Sets the maximum number of concurrent connections |
Failover | |
failover_delay | Sets 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.