Re: Last modification time of a database? - Mailing list pgsql-general

From Daniel Verite
Subject Re: Last modification time of a database?
Date
Msg-id 3b704b96-31ba-44f5-9eb9-b061457f0661@mm
Whole thread Raw
In response to Re: Last modification time of a database?  (Erik Jones <ejones@engineyard.com>)
List pgsql-general
    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 report of dbs that

> haven't seen connections in X long since what I'm really after is
> inactive databases.

Did you think about just setting log_connections to ON and grep'ing the
server logs?

Otherwise it looks like a use-case for ON CONNECT triggers,
unfortunately we don't have them yet.

The TODO list links that message:
http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php


Best regards,

--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org

pgsql-general by date:

Previous
From: berdam
Date:
Subject: Re: Single missing WAL in long sequence..
Next
From: Tim Uckun
Date:
Subject: Database shut down unexpectedly.