Search
Duplicate entries in Lemmy database
cross-posted from: https://lemmy.cafe/post/1403198
Overview
This is a quick write up of what I had spent a few weeks trying to work out.
The adventure happened at the beginning of October, so don't blindly copy paste queries without making absolutely sure you're deleting the right stuff. Use
select
generously.When connected to the DB - run
\timing
. It prints the time taken to execute every query - a really nice thing to get a grasp when things take longer.I've had duplicates in
instance
,person
,site
,community
,post
andreceived_activity
.The quick gist of this is the following:
- Clean up
- Reindex
- Full vacuum
I am now certain vacuuming is not, strictly speaking, necessary, but it makes me feel better to have all the steps I had taken written down.
\d
- list tables (look at it asdescribe database
);
\d tablename
- describe table.`\o filename\ - save all output to a file on a filesystem
My lemmy server just died over night without me doing anything
Woke up in the morning and my selfhosted Lemmy server was basically braindead. I installed it in a Proxmox lxct container using the ansible playbook. It spams my logs with this:
undefined
target: "lemmy_server::root_span_builder", name: "HTTP request", fields: "http.method=POST http.scheme=\"https\" http.host=lemmy.ohaa.xyz http.target=/inbox otel.kind=\"server\" request_id=8206186d-eaf9-486d-99ad-d9c5def188c8", file: "src/root_span_builder.rs", line: 16 }] } lemmyohaaxyz-lemmy-1 | 2023-08-22T05:16:08.001260Z WARN lemmy_server::root_span_builder: data did not match any variant of untagged enum AnnouncableActivities lemmyohaaxyz-lemmy-1 | 0: lemmy_apub::activities::community::announce::receive lemmyohaaxyz-lemmy-1 | at crates/apub/src/activities/community/announce.rs:46 lemmyohaaxyz-lemmy-1 | 1: lemmy_server::root_span_builder::HTTP request lemmyohaaxyz-lemmy-1 | with http.method=POST http.scheme="https" http.host=lemmy.ohaa.xyz http.target=/inbox otel.kind="ser
Trying to set up a development/test instance
looks like the build of diesel failed. I'm using a fresh install of Ubuntu 20.04. Which Ubuntu release are y'all using?