Replies: 2 comments 4 replies
-
This is a good point. I initially tried using a less expensive query SELECT n_live_tup FROM pg_stat_user_tables but this doesn't work for recently created tables that have not had a VACUUM. It would be better to fill in this row-count column lazily, once the table list has been displayed. Also, we should look for a heuristic that is both reasonably fast and reasonably accurate to obtain the information. |
Beta Was this translation helpful? Give feedback.
-
I have now implemented something along these lines in HEAD. There is a user-customizable option |
Beta Was this translation helpful? Give feedback.
-
Hello Eric,
some of my production DBs are huge – I mean: HUGE. Running pgmacs-open fails of course, due to timeout (count(*)), and also puts way too much stress on the DB. It would be great to have an overview of the tables anyway, even without accurate data like number of rows. One option could be to allow passing a function into pgmacs--list-tables, so users would be free to show whatever they need and what their DB is capable of.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions