Re: Weeding out unused user created database objects, could I use pg_catalog?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Allan Kamau <kamauallan(at)gmail(dot)com>, Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Weeding out unused user created database objects, could I use pg_catalog?
Date: 2010-02-12 18:13:38
Message-ID: 17490.1265998418@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton <dev(at)archonet(dot)com> writes:
> On 12/02/10 15:10, Allan Kamau wrote:
>> Therefore I am looking for a solution that contains
>> "last-accessed-time" data for these objects, especially for the
>> functions and maybe the triggers.

> Ah, sorry - misunderstood. There's not any timestamp kept. As you can
> imagine, it would be a cost you'd have to pay every time you accessed an
> object.

> The best you can do is to turn on statement logging, parse the logs to
> see what objects are used and then keep those and their dependencies.

Or: remove some objects, run your test case, see if it succeeds.
Repeat as needed.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2010-02-12 18:40:30 Re: db size and VACUUM ANALYZE
Previous Message Joao Ferreira gmail 2010-02-12 17:51:40 Re: db size and VACUUM ANALYZE