This topic describes how to use the pg_stat_kcache extension to collect statistics on read and write operations in file systems.



Note We recommend that you use a privileged account to execute the statements that are required in this section.
  • Create the extension.
    CREATE EXTENSION pg_stat_kcache;
  • Delete the extension.
    DROP EXTENSION pg_stat_kcache;
  • Query statistics.
    SELECT * FROM pg_stat_kcache();
    Note You can use any database account to execute the statement.
  • Reset statistics.
    select pg_stat_kcache_reset();
    Note You can use only privileged accounts to execute the statement.