After you enable data sharing for AnalyticDB for PostgreSQL instances in Serverless mode, you can query data across the instances. This ensures data timeliness and significantly reduces data redundancy.
Limits
All instances must be in Serverless mode.
All instances must belong to the same Alibaba Cloud account.
All instances must reside within the same region.
Only tables can be shared.
Enable data sharing for instances
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
In the left-side navigation pane, click Data Sharing.
On the Instances for Data Sharing tab, select the instances for which you want to enable data sharing, and then click Add.
In the Add Instances for Data Sharing message, click OK.
NoteThis process may take 5 to 10 minutes to complete. After instances are added for data sharing, shared data can be queried across the instances.
Disable data sharing for instances
After data sharing is disabled, other instances cannot access the shared data.
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
In the left-side navigation pane, click Data Sharing.
On the Instances for Data Sharing tab, select the instances for which you want to disable data sharing, and then click Disable.
In the Disable Data Sharing message, click OK.
What to do next
After instances are added for data sharing, you must execute SQL statements to configure data sharing. For more information, see SQL operations for data sharing.
Related operations
Operation | Description |
Enables or disables data sharing for an AnalyticDB for PostgreSQL instance. | |
Queries the state of data sharing for AnalyticDB for PostgreSQL instances. | |
Queries the information about data sharing performance metrics. |
References
For AnalyticDB for PostgreSQL instances in elastic storage mode, you can use the greenplum_fdw and gp_parallel_retrieve_cursor extensions to query data across instances. For more information, see Query data across instances.