22.2. Synchronizing the Current Database with the Metadata Catalog (axe.catalog_sync) #
When the first analytical query or stored procedure is executed, Postgres Pro AXE connects to the server with the metadata catalog using the connection parameters stored in the metadata catalog secret. Until this connection, analytical tables are unavailable. On this connection, the catalog UUID is bound to the current database. When entries for analytical tables are registered in the metadata catalog, the corresponding wrapper tables are created in the bound database as well.
The current database and the metadata catalog can become unsynchronized if entries for analytical tables are registered in the metadata catalog before the first connection, or if the connection parameters in the metadata catalog secret change.
Important
Execute this stored procedure outside a transaction block.
During the synchronization, the wrapper tables of analytical tables are dropped using the DROP TABLE ... CASCADE command and recreated, so any objects depending on the wrapper tables are dropped as well. Privileges on analytical tables are stored locally, so these privileges must be granted again.
Required privileges: Superuser or the Postgres Pro AXE administrator with the EXECUTE privilege on this stored procedure.
For more information about access management, refer to Chapter 12.
Execute the following command on the Postgres Pro AXE server:
SELECT axe.catalog_sync([synchronization]);
Where synchronization specifies whether to synchronize the current database with the metadata catalog unconditionally.
Possible values:
truefalse
If the current database is bound to the metadata catalog, set this parameter to true for the synchronization to proceed. Otherwise, Postgres Pro AXE returns an error.
Default value: false.
Optional parameter.