Updated on 2025-02-27 GMT+08:00

CREATE BARRIER

Description

Creates a barrier for cluster nodes. The barrier can be used for data restoration.

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

Examples

1
2
3
4
5
-- Create a barrier without specifying its name.
openGauss=# CREATE BARRIER;

-- Specify the barrier name.
openGauss=# CREATE BARRIER 'barrier1';