Closed Bug 799740 Opened 12 years ago Closed 7 years ago

Update last_record() function to report on all tables in schema

Categories

(Socorro :: Database, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: selenamarie, Unassigned, Mentored)

Details

This displays the # of seconds since data was put into a table.
Assignee: nobody → sdeckelmann
Summary: Update last_record() for new tables → Update last_record() function to report on all tables in schema
Whiteboard: [mentor=selena@mozilla.com]
This function is used by monitoring systems to detect stale data.
Assignee: sdeckelmann → nobody
I'm not sure what is meant by "reporting on all tables in the schema."  The table `reports` has a column `date_processed` but according to the documentation, most of the other tables don't save these timestamps.  The other tables are not directly related, so you wouldn't be joining `reports` with them.  

Is that idea to keep track of the last insert for each table?  I found a mention of timetravel functions in http://www.postgresql.org/docs/9.2/static/contrib-spi.html.  But creating new columns for tables might generate a lot of data.  Another way is to create a completely new table and make a trigger that updates this new table every time an insert is made.
I think the intention was to identify other tables which had date-related parameters, and implement the CASE statements for each of those.

For tables which don't have date-related params, it's ok to just ignore those for now.
Mentor: sdeckelmann
Whiteboard: [mentor=selena@mozilla.com]
we are unlikely to improve this
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.