Skip to main content
Changes settings of a database engine. The settings that can be changed depend on the engine; not every engine or setting supports modification after database creation. This statement changes database engine settings, not session settings or defaults for tables in the database.

Syntax

Use ON CLUSTER to execute the statement on all hosts in the specified cluster. The statement requires the ALTER DATABASE SETTINGS privilege.

Supported settings

Refer to the documentation for the database engine for its settings and restrictions. For example:
  • Atomic and Ordinary support changing max_tables.
  • MaterializedPostgreSQL supports changing selected replication settings, such as materialized_postgresql_max_block_size.
  • DataLakeCatalog supports changing selected catalog settings; the available settings depend on the catalog type.
An unsupported engine or setting causes an exception.

Example

Change the maximum number of tables in an Atomic database:
Set max_tables to 0 to remove this database-level limit: