I want to retrieve all the records that were modified in the past hour of running the command. It is purely a meta data command (with no regard to the content of any tabular column data). I want to identify tables and rows of those tables that had some DML modification with a specified temporal duration.
Does Postgres need special configuration to track such detailed meta data before I run a command to return the info I am looking for?
What query would I run to get the results I am looking for?
Best Answer
Postgres 9.5 introduced a feature to record commit timestamps. The documentation:
And functions to work with it.
Once you have activated the setting and restarted the DB server, Postgres starts tracking commit timestamps. Then, for example, to get all rows from a table that were changed in any way during the last 4 hours:
Related: