solarbird: (vision)
[personal profile] solarbird
hm hm hm I think I made a mistake setting up mastodon

so i usually set up my servers to have a separate /home partition and naturally did that here too, with a / of 30gb, which is normally totally fine, i run lean installs.

the problem of course is that postgresql is storing the local database in /var/lib, oops. so we're fine for now but not forever.

is there any reason not to create /home/postgres, clone /var/lib/postgres contents over, and softlink /var/lib/postgres to /home/postgres?

or is it better to clone then edit postgresql.conf to point to /home/postgres?

eta: another mastodon instance administration told me to clone then edit postgresql.conf because system call reasons. and it worked! very cleanly too. genuine "phew" moment lol

Date: 2022-11-16 10:50 pm (UTC)
sistawendy: me in my nun costume with my duster cross, looking hopeful (hopeful nun)
From: [personal profile] sistawendy
As long as Postgres is OK with the symlink, I don't see why not. A quick google suggests that it's fine. You could try it with a test instance first.

Date: 2022-11-16 11:06 pm (UTC)
wrog: (dew)
From: [personal profile] wrog
I believe you want to learn about TABLESPACEs
https://www.postgresql.org/docs/15/manage-ag-tablespaces.html
Basic idea is that if there are particular tables that get large you can put them on a different partition that's big enough for them. I believe you can also change the default tablespace for a database.

Under the hood, they're symlinks but they're symlinks that Postgres knows about.
Edited Date: 2022-11-16 11:06 pm (UTC)

January 2026

S M T W T F S
    1 23
4 56 7 8 910
1112 131415 1617
18192021222324
25262728293031

Most Popular Tags