Re: Connect to specific cluster on command line

2022-05-25 Thread Andreas Fröde

On 5/25/22 16:48, Carsten Klein wrote:

So, forget about the packager. With core PostgreSQL tools it is possible 
to have more than one cluster. How do you specify what cluster to 
connect to with psql or pg_dump?



psql, pg_dump and friends know the -p (or --port) option.
Maybe man psql and man pg_dump are your friends.





Findout long unused tables in database

2022-09-26 Thread Andreas Fröde

Hello,
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?



CIAO
andreas




Re: Findout long unused tables in database

2022-09-26 Thread Andreas Fröde

Hi Laurenz,



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


Thank you for the quick if unfortunate reply.


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


I will try to suggest this. :-)

Have a nice day.

Andreas




Re: Findout long unused tables in database

2022-09-27 Thread Andreas Fröde

Hi Andreas,


no really what you are looking for, i know, but we have 
pg_stat_user_tables. There can you find how often the table was queried 
in the past. Take the data, wait some time, take it again and compare.


Thanks for this idea. i will try it out.

Andreas