Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex MPP Analytics for PostgreSQL
  • Getting started
    • All guides
    • Connecting to an external file server (gpfdist)
    • Access from Trino
      • Managing extensions
      • gp_relaccess_stats
      • gp_relsizes_stats
      • gp_url_tools
      • pgcrypto
      • try_convert
      • uuid-cb
      • Yezzey
    • Auxiliary utilities
  • Access management
  • Inspections and recommendations
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Extension settings
  • Installing gp_relaccess_stats in a Yandex MPP Analytics for PostgreSQL cluster
  • Use cases
  1. Step-by-step guides
  2. Extensions
  3. gp_relaccess_stats

Using gp_relaccess_stats in Yandex MPP Analytics for PostgreSQL

Written by
Yandex Cloud
Updated at September 14, 2026
View in Markdown
  • Extension settings
  • Installing gp_relaccess_stats in a Yandex MPP Analytics for PostgreSQL cluster
  • Use cases

Warning

Apache Cloudberry™ does not support this extension.

gp_relaccess_stats is a Yandex Cloud extension that collects the access statistics for tables and views. It registers the read, insert, update, and delete operations, as well as the timestamp of the user's last access to the object. The collected data helps find unused or improperly used objects.

Extension settingsExtension settings

Configuration Type Default value Description
gp_relaccess_stats.enabled bool false Turns on the collection of statistics. You can enable this setting at the cluster or database level. We recommend the database level option.
gp_relaccess_stats.max_tables integer 65536 Maximum number of tables for caching statistics.
gp_relaccess_stats.dump_on_overflow bool false Decides the behavior if gp_relaccess_stats.max_tables is exceeded. If true, the statistics cache is automatically cleared via relaccess_stats_dump(). If false, you get a low-space warning.

For more on the extension, see the gp_relaccess_stats guide.

Installing gp_relaccess_stats in a Yandex MPP Analytics for PostgreSQL clusterInstalling gp_relaccess_stats in a Yandex MPP Analytics for PostgreSQL cluster

  1. Connect to the database as the owner or a user with the CREATE permission in the database and run this command:

    CREATE EXTENSION gp_relaccess_stats;
    
  2. Make sure the extension has been installed:

    SELECT extname FROM pg_extension;
    

    This will bring up the list of extensions installed in the database.

  3. Contact support to apply the extension.

Use casesUse cases

  1. Create a statistics collection table:

    SELECT mdb_toolkit.relaccess_stats_init();
    

    The relaccess_stats table will get new empty entries for each table and partition of the selected database.

  2. Update the statistics:

    SELECT mdb_toolkit.relaccess_stats_update();
    

    The relaccess_stats table will now be populated with statistics from the cache and the pg_stat folder.

  3. Check the current usage of the statistics cache:

    SELECT mdb_toolkit.relaccess_stats_fillfactor();
    

    This will show the statistics cache fill percentage.

  4. Query the relaccess_stats table for statistical data:

    SELECT * FROM mdb_toolkit.relaccess_stats;
    

Apache® and Apache Cloudberry™ are registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.

Was the article helpful?

Previous
Managing extensions
Next
gp_relsizes_stats
© 2026 Direct Cursus Technology L.L.C.