{"p":"","h":{"iv":"ROXSYW+cfvEbFHu5","at":"ocxplSQjdRC3tXEtB/9/wg=="}}

Darius Kazemi

Have any Mastodon or Hometown admins out there ever done a `pg_repack` on their postgres DB? I have seen admins say that it reduced DB size quite efficiently, and I've found some non-Mastodon-specific tutorials, but what would really help me is the actual command and options to invoke on the CLI that have successfully not broken a mastodon DB in the past

7
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Darius Kazemi

I used to run VACUUM on my DB regularly, but I read multiple places that it's not recommended for postgres 12 because it now basically auto-vacuums? I guess? Can you tell I don't understand much about postgres??

3
2y
Michael Sokolov

@darius I have no idea, all I know is backup should be step One

1
2y
Mohamed Abdi

@darius look cute when you are shut up

0
2y
Nolan

@darius At some point I believe even mastodon.social was running a Postgres extension to auto-vacuum. I believe it was this one: reorg.github.io/pg_repack/

I was never brave enough. ๐Ÿ˜•

1
2y
Dr. Matt Lee :verified:

@darius I did it once on the libre.fm database. Took forever.

0
2y
tim ๐Ÿ“

@darius if you still have your test environment up, maybe you could dump and restore into that and test it out there? I dunno if the db is all the data needed to run

0
2y
be excellent to each other

@darius I'm definitely interested in anything that can improve our DB as well

0
2y
Replies