I wrote up a guide about pg_repack, and how it can be used to fix a misbehaving Pleroma/Rebased database: https://gitlab.com/soapbox-pub/rebased/-/snippets/2463995
Conversation
Notices
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Monday, 28-Nov-2022 07:18:38 JST Alex Gleason -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Monday, 28-Nov-2022 07:18:51 JST Alex Gleason @graf ?
In conversation permalink -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Monday, 28-Nov-2022 07:23:13 JST Alex Gleason @graf Oh right, I wanted to add your cron suggestion too. Can you paste your crontab again? I’ll add it in there.
In conversation permalink -
Embed this notice
anime graf mays ?️? (graf@poa.st)'s status on Monday, 28-Nov-2022 07:23:14 JST anime graf mays ?️? @alex good writeup. it should be a monthly thing tbh even for small servers. we run it weekly on sundays during slow time (so tonight around 4am). it really makes a huge difference In conversation permalink -
Embed this notice
anime graf mays ?️? (graf@poa.st)'s status on Monday, 28-Nov-2022 07:28:50 JST anime graf mays ?️? @alex we have it packed out to an sh file in /usr/local/sbin so crontab doesnt fuck up but you can get away with this
our database server is on UTC so this will run at 7AM UTC (about 2am ET)
0 7 * * * /usr/bin/sudo -Hu postgres /usr/lib/postgresql/{12|13|14|15}/bin/pg_repack -a >/dev/null 2>&1
In conversation permalink Alex Gleason likes this. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Monday, 28-Nov-2022 07:35:04 JST Alex Gleason @graf Updated it, thank you.
In conversation permalink -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Monday, 28-Nov-2022 08:23:56 JST Alex Gleason @abundance Only if you’re experiencing it - probably as the result of a migration.
In conversation permalink -
Embed this notice
Abu-n-Dance (abundance@svltan.at)'s status on Monday, 28-Nov-2022 08:24:05 JST Abu-n-Dance @alex if this is migration issue then do I need to reindex only once or is it expected to break again? In conversation permalink -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Monday, 28-Nov-2022 09:32:02 JST Alex Gleason @tassoman Yes. It seems to fix it.
In conversation permalink -
Embed this notice
Tassoman (tassoman@orwell.fun)'s status on Monday, 28-Nov-2022 09:32:03 JST Tassoman Maybe this is related to that event of CPU100% we discussed shortly some days ago? ? In conversation permalink -
Embed this notice
Jingo :psycat: (jingo@smittenkittens.xyz)'s status on Monday, 28-Nov-2022 10:25:59 JST Jingo :psycat: Thanks for this Alex. There’s something wrong with mine so I’ll follow this and see if I can work it out. In conversation permalink Alex Gleason likes this.
-
Embed this notice