Re: Last modification time of a database?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Last modification time of a database?
Дата
Msg-id 13630.1237942059@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Last modification time of a database?  (Erik Jones <ejones@engineyard.com>)
Список pgsql-general
Erik Jones <ejones@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 while run a report of dbs that
> haven't seen connections in X long since what I'm really after is
> inactive databases.

It seems like a pretty low-precision result would be sufficient for what
you need.  Have you tried just tracking the last file mod time within
each database directory?  This would be later than the real last use
due to delayed vacuum, etc, but it might be good enough.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: Last modification time of a database?
Следующее
От: berdam
Дата:
Сообщение: Re: Res: Case sensitivity problems with user name