Enable or disable data sharing

更新时间:
复制 MD 格式

Enable data sharing for an AnalyticDB for PostgreSQL instance in serverless mode for cross-instance queries. This feature provides real-time data access and reduces data redundancy.

Limitations

  • All instances must be in serverless mode.

  • All instances must belong to the same Alibaba Cloud account.

  • All instances must be in the same region.

  • Only table-level data sharing is supported.

Enable data sharing

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. In the navigation pane on the left, click Data Sharing.

  4. On the Instances for Data Sharing page, select the instances to add, and then click Add.

  5. In the Add Instances for Data Sharing dialog box, click OK.

    Note

    Enabling data sharing takes about 5 to 10 minutes. After the process is complete, you can access shared data across instances.

Disable data sharing

Warning

After data sharing is disabled, other instances cannot access the shared data.

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. In the navigation pane on the left, click Data Sharing.

  4. On the Instances for Data Sharing page, select the instance to disable, and then click Disable.

  5. In the Disable Data Sharing dialog box, click OK.

Next steps

After you add an instance to data sharing, you also need to configure data sharing using SQL. For details, see Data Sharing SQL.

API reference

API

Description

SetDataShareInstance

Call the SetDataShareInstance operation to add or remove an AnalyticDB for PostgreSQL instance from data sharing.

DescribeDataShareInstances

Call the DescribeDataShareInstances operation to query the status of data sharing.

DescribeDataSharePerformance

Call the DescribeDataSharePerformance operation to query the performance metrics of data sharing.

Related documentation

For instances in elastic storage mode, you can use the greenplum_fdw and gp_parallel_retrieve_cursor extensions to perform a cross-instance query. For more information, see Cross-instance query.