I actually have the opposite question: isn’t there reduced performance from Discourse from only soft deleting posts instead always permanently deleting them? There must be some burden acumulated after some years for some forums. Is it done this way to keep statistics for each account even when posts/topics are removed?
Not really. BTree indexes mean we can search in
O(log n) for posts and topics, so there is a sub-linear cost growth.
In the largest Discourse instances out there, post quantity never were the performance bottleneck in production. That said we keep an eye on it and we can always come back and refactor it if needed.
In short, no.
First of all, I believe that most communities have many more visible posts than deleted posts. For example, here on Meta the total amount of posts is 1,015,386 and only 81,480 of these are deleted. That is less than 10%. Probably the total amount of deleted data is less than 100MB of data.
As Falco said, the performance impact of storing and indexing more data is negligible. Database systems are optimized to hold a lot more data than one can imagine and even the most simple configurations can hold thousands of thousands of data points without breaking a sweat.
Maybe this is not the best comparison in the world, but can you notice your PC getting slower as you store more files? Most probably no and the file system is some kind of database system too.
Thanks so much for this thread! I think it’s exactly what I am looking for. I had a few questions, if I enable this:
- will I need to do a
./launcher rebuild appafterwards?
- will the value be stored in the DB somewhere? Since its not in the admin UI I want to ensure if my VM gets wiped and I follow the Cloud install guide (using the same DB) that the setting will still be there.
Nope, only reload the browser.
Yes, all changes to site settings are stored in the DB
I wanted to document this here. The permanently delete functionality for various user groups:
| User Group | Has Permanently Delete | | ----------- | ---------------------- | | Admin | Y | | Moderator | Y | | TL4 | N | | TL3 | N | | TL2 | N | | TL1 | N | | TL0 | N |
Feel free to correct me if this isn’t right, but I was able to do a quick test on my Forums.
I wasn’t sure a moderator could permanently delete, but I’ve had a test run to check and the option does appear in their post wrench. Though when I attempted it with a test moderator it gave me a ‘Sorry, an error has occurred’ message, but worked fine using an admin account.
Is there something extra I need to do to allow a moderator to do it?
Be sure to open a bug on this (either here or on dev) sounds like something we want to fix. I think this feature is an admin only feature.
I am a beginner in the world of hosting and wanted to ask you:
Where can I change the value you described?
Is there a config file in discourse folder? or do I need to change it somewhere in docker?
A little hint would be awesome
Hello and welcome @auriv
There’s a little bit more detail on how to access the rails console and change this site setting in this topic:
Awesome! Thank you for your help!
Have a nice Sunday
When deleting a post, it will delete the topic itself too, if there was only 1 post, correct?
I have noticed that this does not allow the system topics/posts to be deleted. E.g if i want to delete the about topic for category eg About the Insurance category - How To Discuss
Or may-be it was auto created by system/admin, and there is no option to permanelt delete it. And there is not even any option to change ownership of system created topics for deleting them.
I think i will have to either delete them manually using
cd /var/discourse ./launcher enter app rails c Post.where(topic_id: 15610).destroy_all Topic.find_by(id: 15610).destroy!
OR i would have to UN LIST the topic. If i unlist, it will only be visible to admins and not to anyone else, right?
Actually facing this Google spam penalty issue, that’s why need to clean my site and delete all duplicate or thin content from my site in bulk. Also wondering if there is any way to find all low word count thin content on my entire discourse site?
@Moin I actually followed your advice and unlisted all of them.
But whenever i delete any topics using the above console code i shared, all these about this category topics again get created.
Now i have to unlist them again, is there any way to permanently delete these so they don’t get created again?
Google has given my site thin content penalty due to these issues.
Google is detecting duplicate content on all of these. how do i fix this?
Writing those descriptions for example?
No, they’re necessary for a category to function, the existing text is placeholder and should always be tailored.
You need to write unique category descriptions for every publicly available category on your site.
I’m not sure I’m following you. If you unlist them, you don’t have your issue anymore, right? No need to delete them.
When i did unlist them, after some time, they start to show again and get listed automatically, don’t know why. I wanted them to permanently unlist. Is there anyway to permanently unlist these or permanently delete these?
Unlisting About topics was advised by @JammyDodger here:
I did a test in my forum, I triggered pretty much all the Sidekiq tasks and my About topic kept being hidden from regular users.