Updated on 2024-05-07 GMT+08:00

CREATE BARRIER

Description

Creates a barrier for cluster nodes. The barrier can be used for data restoration. This function is for internal use only. You are advised not to use it.

Precautions

Generally, CREATE BARRIER is used only for backup and restoration. Therefore, CREATE BARRIER can be executed only in the following scenarios:

  • The database initial user can run this command.
  • If the backup and restoration mode is enabled on the CN, that is, the GUC parameter operation_mode is set to on, users with the OPRADMIN permission can run this command.

Syntax

1
CREATE BARRIER [ barrier_name  ] ;

Parameters

barrier_name

(Optional) Specifies the name of a barrier.

Value range: a string. It must comply with the naming convention.

Examples

1
2
-- Specify the barrier name.
gaussdb=# CREATE BARRIER 'barrier1';