79747240

Date: 2025-08-26 19:29:04
Score: 0.5
Natty:
Report link

In addition to @Frank Heikens’ answer, you can try adding triggers on each table to track information for writes since pg_stat_user_tables only provides counters but not timestamps.

To minimize overhead, you can use FOR EACH STATEMENT trigger instead of FOR ROW as it executes per command regardless of the number of rows. You can read more about the trigger behavior in this documentation or take a look at this Medium article about using triggers to track every insert, update, and delete.

Reasons:
  • Blacklisted phrase (1): this document
  • Whitelisted phrase (-1.5): you can use
  • Has code block (-0.5):
  • User mentioned (1): @Frank
  • Low reputation (0.5):
Posted by: yannco