Re: Recording vacuum/analyze/dump times - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Recording vacuum/analyze/dump times
Date
Msg-id Pine.OSF.4.61.0503072032140.490429@kosh.hut.fi
Whole thread Raw
In response to Recording vacuum/analyze/dump times  ("Jim Buttafuoco" <jim@contactbda.com>)
Responses Re: Recording vacuum/analyze/dump times  ("Jim Buttafuoco" <jim@contactbda.com>)
List pgsql-hackers
On Mon, 7 Mar 2005, Jim Buttafuoco wrote:

> Its there a reason postgresql doesn't record vacuum/analyze and dump times in pg_class (or another table).  This
seems
> like it would be a very helpful feature.
>
> for pg_dump I would add an option --record=YES|NO
> for vacuum and analyze I would add a NORECORD|RECORD option

You could easily do this in application level:

CREATE TABLE vacuums (relname name, last_vacuum timestamp);

Every time you vacuum, do:

VACUUM foobar; UPDATE dumps set last_dump = now() WHERE relname = 'foobar';

Same for pg_dump.

- Heikki


pgsql-hackers by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Recording vacuum/analyze/dump times
Next
From: "Jim Buttafuoco"
Date:
Subject: Re: Recording vacuum/analyze/dump times