pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
User info?
3+ messages / 3 participants
[nested] [flat]

* User info?
@ 2008-12-03 15:30 Carol Walter <walterc@indiana.edu>
  2008-12-03 16:53 ` Re: User info? Scott Marlowe <scott.marlowe@gmail.com>
  2008-12-03 18:09 ` Re: User info? Fabricio <fabrixio1@hotmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Carol Walter @ 2008-12-03 15:30 UTC (permalink / raw)
  To: pgsql-admin

Is there a way to tell when the last time a database in a cluster was  
accessed?  I have a large number of student databases that are  
probably inactive, but I don't want to just destroy.  I'd like to  
archive these, but I need to be able to tell when they were last  
accessed?

Carol



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: User info?
  2008-12-03 15:30 User info? Carol Walter <walterc@indiana.edu>
@ 2008-12-03 16:53 ` Scott Marlowe <scott.marlowe@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Scott Marlowe @ 2008-12-03 16:53 UTC (permalink / raw)
  To: Carol Walter <walterc@indiana.edu>; +Cc: pgsql-admin

On Wed, Dec 3, 2008 at 8:30 AM, Carol Walter <walterc@indiana.edu> wrote:
> Is there a way to tell when the last time a database in a cluster was
> accessed?  I have a large number of student databases that are probably
> inactive, but I don't want to just destroy.  I'd like to archive these, but
> I need to be able to tell when they were last accessed?

No direct method from within the db I know of, but you could use
oid2name / a list of db relids then go into the data/base directory
and see when the last time the files in the individual db directories
had been updated.  That won't tell you the last time they were
ACCESSED, but will give you an idea if they're being updated or not.
Note that vacuum may change the last update times so it's not
foolproof by any means.

The other method is to log connections and then scrape the logs.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: User info?
  2008-12-03 15:30 User info? Carol Walter <walterc@indiana.edu>
@ 2008-12-03 18:09 ` Fabricio <fabrixio1@hotmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Fabricio @ 2008-12-03 18:09 UTC (permalink / raw)
  To: walterc@indiana.edu; pgsql-admin


In postgresql.conf you can enable connections logs. log_connections = on
> From: walterc@indiana.edu> To: pgsql-admin@postgresql.org> Subject: [ADMIN] User info?> Date: Wed, 3 Dec 2008 10:30:22 -0500> > Is there a way to tell when the last time a database in a cluster was > accessed? I have a large number of student databases that are > probably inactive, but I don't want to just destroy. I'd like to > archive these, but I need to be able to tell when they were last > accessed?> > Carol> > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)> To make changes to your subscription:> http://www.postgresql.org/mailpref/pgsql-admin
_________________________________________________________________
Live Search premia tus búsquedas, llévate hasta ¡Un Auto!
http://www.ganabuscando.com/Default.aspx=

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-12-03 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-12-03 15:30 User info? Carol Walter <walterc@indiana.edu>
2008-12-03 16:53 ` Scott Marlowe <scott.marlowe@gmail.com>
2008-12-03 18:09 ` Fabricio <fabrixio1@hotmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox