This article describes the preparations for using the global AWR feature.

Kernel versions

We recommend that you upgrade the kernel version to 20211231 or later.

Execute the following statement to view the current kernel version:
show polar_release_date;
The following result shows that the current kernel version is 20211231.
polar_release_date
--------------------
20211231
(1 row)

Permissions

The control permissions and data permissions for the global AWR feature are PUBLIC.

Time zones

The default time zone of PolarDB for PostgreSQL(Compatible with Oracle) database instances is UTC. When you view the performance data, you must remember the time difference for your time zone.

Enable and disable the local storage feature for global AWR data

You must enable the local storage feature for global AWR data. After the global AWR feature is enabled, fine-grained performance reports can be generated without periodically triggering snapshots. You can view performance data in polar_gawr_collection mode of the postgres database. For more information, see Data parsing.
Note For key metrics, PolarDB for PostgreSQL(Compatible with Oracle) performs fine-grained collection and writing. After the global AWR feature is enabled, additional overheads are incurred. You must carefully evaluate whether the global AWR feature is necessary from the following perspectives:
  • Overall performance overheads: are within 10%.
  • Storage overheads: By default, data is retained for three days. The size of the most fine-grained data for three days must be less than 10 GB.
Procedure
  • Enable the local storage feature for Global AWR data.
    SELECT polar_gawr_collection.enable_store_in_localdb();
    A similar output is displayed:
     enable_store_in_localdb
    -------------------------
    
    (1 row)
  • Disable the local storage feature for Global AWR data.
    SELECT polar_gawr_collection.disable_store_in_localdb();
    A similar output is displayed:
     disable_store_in_localdb
    --------------------------
    
    (1 row)
  • View whether the local storage feature for Global AWR data is enabled.
    SELECT polar_gawr_collection.show_store_in_localdb();
    A similar output is displayed:
     show_store_in_localdb
    -----------------------
     t
    (1 row)