Re: Findout long unused tables in database

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Andreas Fröde <psql(at)andreas(dot)spider-net(dot)de>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Findout long unused tables in database
Date: 2022-09-27 04:25:13
Message-ID: fd9b5d4c8bb625f44d509eb7b9769490f2d5f368.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2022-09-26 at 14:05 +0200, Andreas Fröde wrote:
> I am looking for a way to find out when a table was last used for
> reading. (Without writing every statement in the logfile or putting a
> trigger on it). Is there such a thing?

No, there is no way to do that short of logging all statements.

I expect that removing permissions on a table and checking whether
your application hits an error is not an option...

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Fröde 2022-09-27 05:35:05 Re: Findout long unused tables in database
Previous Message Tom Lane 2022-09-26 20:16:25 Re: [PATCH] Introduce array_shuffle() and array_sample()