Configure

configure – change a server configuration parameter

  1. configure {session | current database | instance}
  2. set parameter := value ;
  3. configure instance insert parameter-class insert-shape ;
  4. configure {session | current database | instance} reset parameter ;
  5. configure {current database | instance}
  6. reset parameter-class [ filter filter-expr ] ;

Description

This command allows altering the server configuration.

The effects of configure session last until the end of the current session. Some configuration parameters cannot be modified by configure session and can only be set by configure instance.

configure current database is used to configure an individual EdgeDB database within a server instance with the changes persisted across server restarts.

configure instance is used to configure the entire EdgeDB instance with the changes persisted across server restarts. This variant acts directly on the file system and cannot be rolled back, so it cannot be used in a transaction block.

The configure instance insert variant is used for composite configuration parameters, such as Auth.

Parameters

parameter

The name of a primitive configuration parameter. Available configuration parameters are described in the Config section.

parameter-class

The name of a composite configuration value class. Available configuration classes are described in the Config section.

filter-expr

An expression that returns a value of type std::bool. Only configuration objects matching this condition will be affected.

Examples

Set the listen_addresses parameter:

  1. configure instance set listen_addresses := {'127.0.0.1', '::1'};

Set the query_work_mem parameter for the duration of the session:

  1. configure session set query_work_mem := <cfg::memory>'4MiB';

Set the same parameter, but for the current database:

  1. configure current database set query_work_mem := <cfg::memory>'4MiB';

Add a Trust authentication method for “my_user”:

  1. configure instance insert Auth {
  2. priority := 1,
  3. method := (insert Trust),
  4. user := 'my_user'
  5. };

Remove all Trust authentication methods:

  1. configure instance reset Auth filter Auth.method is Trust;