EDIT: With thanks to u/code@lemmy.mayes.io, I have a solution for cleaning up the one table that is growing ridiculously in size and that is the activity table. A TRUNCATE activity; command cleaned that right up. A word of caution is in order because the Lemmy instance must be shutdown completely and only the postgres container running if you’re using docker.

As a new Lemmy admin, I think I really need to learn PostgreSQL administration because I need a way to keep my database from ballooning in size and there are no management tools built yet for it. Would someone be so kind as to recommend a good website for learning PostgreSQL? This would also help me maintain my mastodon instance.

      • code@lemmy.mayes.io
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 year ago

        Look at vacumn command. Also dbeaver is a teally good gui tool. Right now there is one table thats the main cause (i think its called activity but dont quote me on that there was a post about it)

        That table is mainly for debugging as it logs every action in activitypub your instance does. I truncate it once a week and vacumn it (shrinks the disk space used). Caution. You must shut down lemmy before doing so. I run containers so i stop all except postgres and clean it up.

  • PenguinCoder@beehaw.org
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 year ago

    learn PostgreSQL administration

    Definitely helpful, but administration only goes so far with the Lemmy database. Take a look at this post and let me know if it answers any of your questions; if you have more feel free to ask, or ping me on matrix @penguincoder:hive.beehaw.org

  • linuxguy@lemmy.gregw.us
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Why are you concerned with your database ballooning?

    What do you think you’ll be able to do to the database to prevent this?

    What do you want to do?