aurora_stat_bgwriter - Amazon Aurora
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


aurora_stat_bgwriter is a statistics view showing information about Optimized Reads cache writes.





Return type

SETOF record with all pg_stat_bgwriter columns and the following additional columns. For more information on pg_stat_bgwriter columns, see pg_stat_bgwriter.

You can reset stats for this function using pg_stat_reset_shared("bgwriter").

  • orcache_blks_written – Total number of optimized reads cache data blocks written.

  • orcache_blk_write_time – If track_io_timing is enabled, it tracks the total time spent writing optimized reads cache data file blocks, in milliseconds. For more information, see track_io_timing.

Usage notes

This function is available in the following Aurora PostgreSQL versions:

  • 15.4 and higher 15 versions

  • 14.9 and higher 14 versions


=> select * from aurora_stat_bgwriter(); -[ RECORD 1 ]-----------------+----------- orcache_blks_written | 246522 orcache_blk_write_time | 339276.404