Help Center/ GaussDB(DWS)/ More Documents/ User Guide/ Clusters/ Managing Parameter Templates
Updated on 2022-06-10 GMT+08:00

Managing Parameter Templates

To facilitate database parameter configuration, GaussDB(DWS) provides the parameter template function. A parameter template contains some common database parameters. You can manage parameter templates on the GaussDB(DWS) management console. After applying a parameter template to a cluster, you can modify parameters on the parameter modification page of the cluster.

The following parts are included in this section:

Overview

A parameter template is a set of parameters applicable to data warehouses. All parameters in the template have default values. The parameters include the session timeout interval, date, and time format. For details, see Parameters. You can adjust parameter values to better adapt the database to actual services. When creating a cluster, you can specify a parameter template for it. Parameters in the template will be applied to all databases in the cluster. If you do not specify a parameter template, the system applies the default parameter template to the cluster. After a cluster is created, you can modify the parameters on the Parameter Modifications page. Alternatively, select an existing parameter template or create a parameter template on the Parameter Template Management page and apply it to the cluster.

GaussDB(DWS) presets a default parameter template to data warehouses of each version. The default parameter template cannot be deleted and modified. If you want to modify parameter values in the template, create a customized parameter template. The parameters in the customized template can be modified. After a customized parameter template is applied to a cluster, it is not associated with the cluster. If you modify the parameter values in the template, the modifications will not be synchronized to the cluster. You need to apply the template to the cluster again, and then the modified parameter values can be applied to the cluster. Similarly, if you modify parameters on the cluster details page, the modifications will not be synchronized to the parameter template.

The default values of the following parameters are for reference only. For more information, see "Setting GUC Parameters".

Parameters

The parameter template only contains three parameters. These parameters will take effect on a cluster during cluster installation. You can check more parameters on the cluster parameter modification page of the console. For details, see Modifying Database Parameters.

Table 1 Parameters

Parameter

Description

Default Value

timezone

Sets the time zone displayed in the time stamps.

UTC

log_timezone

Sets the time zone for timestamps in the server log.

UTC

password_encryption_type

Specifies the encryption type of user passwords.

  • 0 indicates that passwords are encrypted with MD5.
  • 1 indicates that passwords are encrypted with SHA-256, which is compatible with the MD5 user authentication method of the PostgreSQL client.
  • 2 indicates that passwords are encrypted with SHA-256. MD5 is not recommended because it is not a secure encryption algorithm.

1

Creating a Parameter Template

If parameters in the default parameter template cannot meet service requirements, you can customize a parameter template and change the parameter values to better adapt to services.

To create a parameter template, perform the following steps:

  1. Log in to the GaussDB(DWS) management console.
  2. In the navigation tree on the left, click Parameter Templates.
  3. Click Create Parameter Template and set the following parameters:

    • Database Engine: Select a database engine.
    • Database Version: Select a database version.
    • Name: Enter the name of the new parameter template.

      Enter 4 to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. The value must start with a letter. Letters are case-insensitive.

    • Description: Enter the description of the new parameter template. This parameter is optional.

      The parameter template description contains 0 to 256 characters and does not support special characters !<>'=&".

    The Database Engine and Database Version selected during parameter template creation must be the same as the cluster type and version of the parameter template to be applied.

  4. Click OK.

Modifying a Parameter Template

You can modify the parameter values in a customized parameter template but cannot modify the parameter values in the default parameter template.

  1. Log in to the GaussDB(DWS) management console.
  2. In the navigation tree on the left, click Parameter Templates.
  3. In the Name column, click the name of the target parameter template. Its parameter table is displayed.
  4. Enter a new value in the Value column of the parameter to be modified. After the modification, click Save.

    Figure 1 Modifying parameters

  5. In the Modification Preview dialog box, confirm the settings and modifications and click Save.

Applying a Parameter Template to the Cluster

After a cluster is created, you can apply a new parameter template to the cluster so that the values of all parameters in the parameter template can take effect in the cluster.

To apply a parameter template, perform the following steps:

  1. Log in to the GaussDB(DWS) management console.
  2. In the navigation tree on the left, click Parameter Templates.
  3. Select the target parameter template and click Apply in the Operation column.
  4. In the Parameter Template Application dialog box that is displayed, select the target cluster.

    You can apply the selected parameter template to the cluster corresponding to the parameter template version.

  5. Click OK.

    If some parameter values in the new parameter template are different from the original parameter values in the cluster, a window comparing the differences will be displayed.

Deleting a Parameter Template

You can delete an unnecessary parameter template or a parameter template that is no longer used. The default parameter template cannot be deleted. Deleted parameter templates cannot be restored. Exercise caution when performing this operation.

  1. Log in to the GaussDB(DWS) management console.
  2. In the navigation tree on the left, click Parameter Templates.
  3. In the Operation column of the parameter template to be deleted, click Delete.
  4. In the displayed dialog box, click Yes.