Why my discourse postgres_data is too big

Thought of reviving this topic, since it’s the same issue.

Our discourse postgres_data folder is 75GB big. Which I think is a lot. According to the admin panel, a backup is around 10.5GB and the uploads take about 9.3GB.

I’ve checked which tables were taking more space and this is what I get:

 public.posts                | 51 GB
 public.post_search_data     | 9769 MB
 public.post_timings         | 3997 MB
 public.user_actions         | 2144 MB
 public.post_custom_fields   | 1039 MB
 public.topics               | 676 MB
 public.post_stats           | 663 MB
 public.post_replies         | 643 MB
 public.quoted_posts         | 523 MB
 public.user_visits          | 476 MB
 public.top_topics           | 403 MB
 public.user_auth_token_logs | 364 MB
 public.topic_links          | 353 MB
 public.topic_users          | 335 MB
 public.topic_views          | 301 MB
 public.user_histories       | 220 MB
 public.users                | 209 MB
 public.stylesheet_cache     | 194 MB
 public.directory_items      | 143 MB
 public.notifications        | 139 MB

I wonder if it’s normal to have a public.posts table taking so much space (51GB), we’re talking about a 6M post forum, which I don’t see as something extraordinary.

Is this normal?

3 Likes