Skip to main content
You can configure your PlanetScale Postgres cluster settings in the “Parameters” tab on the Clusters page for your database. The defaults for each parameter depend on the configuration 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.

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 Clusters 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

Configuring parameters with the CLI

You can also inspect and update parameters with the PlanetScale CLI:
Parameters are addressed as namespace.name, for example pgconf.max_connections for PostgreSQL settings or pgbouncer.default_pool_size for PgBouncer settings. See the branch command reference for all flags.

Tracking changes to parameters

You can click on the “Changes” tab on the Clusters 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.
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.

Parameter change types

PostgreSQL parameter changes fall into two categories based on how they are applied:
  • Reloadable changes: The parameter can be updated without restarting PostgreSQL, resulting in zero downtime
  • Restart-required changes: PostgreSQL requires a cluster restart for the parameter to take effect
Parameters that require a restart are marked with a ✅ in the “Restart Required” column in the parameter reference table below.

Restart behavior for production clusters

When you apply parameters that require a restart, PlanetScale performs a rolling restart process to minimize downtime:
  1. Configuration changes are first applied to replica instances and they are restarted
  2. Once replicas are ready, a switchover promotes one replica to become the new primary
  3. The configuration is applied to the former primary (now a replica) and it is restarted
Config change with restart This rolling restart process minimizes downtime, but there remains a brief several-second window of unavailability during the primary switchover. All direct database connections will be terminated during this process, so your application should implement connection retry logic. With the exception of the Number of processes parameter for PgBouncer, PgBouncer connections persist through all parameter changes and do not require reconnection. Some parameters are required by PostgreSQL to be applied to the primary before replicas, which may result in a slightly longer unavailability period.

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.

Parameters not in the dashboard

The Parameters tab covers the most common cluster-level settings, but PostgreSQL exposes many more configuration parameters than what appears in the dashboard. If a parameter isn’t listed in the dashboard, that doesn’t mean it can’t be changed — it means it’s typically managed at a different scope. You can set many other PostgreSQL runtime parameters directly via SQL at the session, role, or database level using standard PostgreSQL commands:
  • Session — Applies only to the current connection. Resets when the connection closes.
  • Role — Applies to all future sessions for a specific database role. Useful for enforcing defaults per application user.
  • Database — Applies to all future sessions connecting to a specific database.
These SQL-level settings take effect immediately for new sessions and do not require a cluster restart.

Common examples

Some frequently useful parameters that can be set via SQL include:
  • idle_in_transaction_session_timeout — Terminates sessions that sit idle inside an open transaction for too long. This is an important safety net for preventing long-lived transactions from holding locks and blocking writes. See also the PgBouncer idle_transaction_timeout setting for a complementary connection-pooler-level control.
  • statement_timeout and transaction_timeout — Bound how long individual queries and transactions can run. See the connection resilience guide for recommended configuration.
  • lock_timeout — Prevents statements from waiting indefinitely to acquire locks. Particularly useful for DDL operations to avoid blocking other queries.
  • application_name — Identifies your application in monitoring tools and pg_stat_activity.
Dashboard parameters are applied at the cluster level and are managed through PlanetScale’s rolling restart process. SQL-level settings (SET, ALTER ROLE, ALTER DATABASE) operate at a different scope and do not interact with or override cluster-level parameters set in the dashboard. SQL-level settings take precedence for the sessions they apply to.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.