Re: [GENERAL] Last modification time of a database?

2009-03-25 Thread Daniel Verite
Erik Jones wrote: These are all client databases at the web hosting company I work at. I can't go putting triggers on all of their tables. I think I'll just start taking snapshots of pertinent data from pg_stat_activity and after I've been collecting data for a while run a

Re: [GENERAL] Last modification time of a database?

2009-03-24 Thread Erik Jones
On Mar 23, 2009, at 5:00 PM, Craig Ringer wrote: Erik Jones wrote: Am I missing something obvious here? If not, has anyone come up with a reliable way to do this? Triggers on all your tables that append to a logging table? Have the client do it? Note that you do *NOT* want to have

Re: [GENERAL] Last modification time of a database?

2009-03-24 Thread Tom Lane
Erik Jones ejo...@engineyard.com writes: These are all client databases at the web hosting company I work at. I can't go putting triggers on all of their tables. I think I'll just start taking snapshots of pertinent data from pg_stat_activity and after I've been collecting data for a

[GENERAL] Last modification time of a database?

2009-03-23 Thread Erik Jones
So, I've got loads of databases and I'd really like some way to see what the last actual modification time was for them. I can't just check the time stamp on the file in the database directory as autovacuum fudges that and trying to match up values for either last_autovacuum or

Re: [GENERAL] Last modification time of a database?

2009-03-23 Thread Craig Ringer
Erik Jones wrote: Am I missing something obvious here? If not, has anyone come up with a reliable way to do this? Triggers on all your tables that append to a logging table? Have the client do it? Note that you do *NOT* want to have triggers that attempt to UPDATE a table to record the